Skip to content

Commit

Permalink
Minor update to packaging config to publish packages to PyPI (#21)
Browse files Browse the repository at this point in the history
Fixes #20 Minor update to packaging config to publish packages to PyPI
  • Loading branch information
amruthvvkp authored May 22, 2022
1 parent f192b17 commit ee111a5
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 21 deletions.
36 changes: 19 additions & 17 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,25 @@ permissions:

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,7 @@ cython_debug/
.vscode/launch.json

# pytest files
junit/*
junit/*

# PYPI Secrets
.pypirc
9 changes: 6 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,12 @@ def run(self):
long_description=long_description,
long_description_content_type='text/markdown',
python_requires='>=3.7, !=3.9, != 3.10',
packages=find_packages(where="src"),
package_dir={"": "src"},
package_data={'flaui': ['flaui/bin/*.dll']},
packages=find_packages("src"),
package_dir={"": "src"}, # tell distutils packages are under src
package_data={
# If any package contains *.dll files, include them:
"": ["*.dll"],
},
install_requires=install_requires,
classifiers=[
'Programming Language :: Python :: 3',
Expand Down

0 comments on commit ee111a5

Please sign in to comment.