Skip to content

Commit

Permalink
Publish wheel artifacts with commit id
Browse files Browse the repository at this point in the history
See kirienko/gourmet PR #177
  • Loading branch information
cydanil authored Sep 10, 2020
2 parents 1b7fe0e + 8591603 commit dd2591b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 34 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
31 changes: 0 additions & 31 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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,
},
Expand Down

0 comments on commit dd2591b

Please sign in to comment.