diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 738ea962a..2d99ddbed 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,34 +16,37 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Install Ubuntu dependencies run: > sudo apt-get update -q && sudo apt-get install --no-install-recommends -y xvfb python3-dev python3-gi python3-gi-cairo gir1.2-gtk-3.0 libgirepository1.0-dev libcairo2-dev intltool enchant python3-enchant + - name: Install dependencies run: | python3 -m pip install --upgrade pip pip3 install --upgrade keyrings.alt if [ -f development.txt ]; then pip3 install -r development.txt; fi if [ -f requirements.txt ]; then pip3 install -r requirements.txt; fi + - name: Install run: | pip3 install . + - name: Build source distribution run: | python3 setup.py sdist + - name: Verify internationalization run: | python3 setup.py build_i18n - - name: Verify icons packaging - run: | - python3 setup.py build_icons - name: Build wheel run: | python3 setup.py bdist_wheel + mv dist/gourmet-*-py3-none-any.whl dist/gourmet-${GITHUB_SHA::8}-py3-none-any.whl - name: Upload wheel uses: actions/upload-artifact@v2 diff --git a/setup.py b/setup.py index c0e2ce954..96a83664d 100644 --- a/setup.py +++ b/setup.py @@ -201,37 +201,7 @@ def run(self): data_files.append((target, files_merged)) -class build_icons(distutils.cmd.Command): - - description = "select all icons for installation" - - user_options = [('icon-dir=', 'i', 'icon directory of the source tree')] - - def initialize_options(self): - self.icon_dir = None - - def finalize_options(self): - if self.icon_dir is None: - self.icon_dir = os.path.join("gourmet", "data", "icons") - - def run(self): - data_files = [] # TODO: What the heck is this method doing? - - for size in glob.glob(os.path.join(self.icon_dir, "*")): - for category in glob.glob(os.path.join(size, "*")): - icons = [] - for icon in glob.glob(os.path.join(category, "*")): - if not os.path.islink(icon): - icons.append(icon) - if icons: - data_files.append(("share/icons/hicolor/%s/%s" % - (os.path.basename(size), - os.path.basename(category)), - icons)) - - distutils.command.build.build.sub_commands.append(("build_i18n", None)) -distutils.command.build.build.sub_commands.append(("build_icons", None)) class build_py(distutils.command.build_py.build_py): @@ -520,7 +490,6 @@ def crawl_plugins(base, basename): include_package_data=True, cmdclass={'build': build_extra, 'build_i18n': build_i18n, - 'build_icons': build_icons, 'build_py': build_py, 'build_scripts': build_scripts, },