Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to pyproject.toml #145

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,12 @@ jobs:
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi

- name: Update setuptools
run: |
python -m pip install --upgrade setuptools

- name: Install library
run: python3 setup.py install
run: pip install .

- name: Install sphinx
run: pip3 install pylint Sphinx sphinx-rtd-theme
Expand Down
20 changes: 13 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,31 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Check For setup.py
- name: Check For pyproject.toml
id: need-pypi
run: |
echo ::set-output name=setup-py::$( find . -wholename './setup.py' )
echo ::set-output name=pyproject-toml::$( find . -wholename './pyproject.toml' )
- name: Set up Python
if: contains(steps.need-pypi.outputs.setup-py, 'setup.py')
if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Update setuptools
run: |
python -m pip install --upgrade setuptools
- name: Install dependencies
if: contains(steps.need-pypi.outputs.setup-py, 'setup.py')
if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install build wheel twine
- name: Build and publish
if: contains(steps.need-pypi.outputs.setup-py, 'setup.py')
if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist
for file in $(find -not -path "./.*" -not -path "./docs*" \( -name "*.py" -o -name "*.toml" \) ); do
sed -i -e "s/0.0.0/${{github.event.release.tag_name}}/" $file;
done;
python -m build
twine upload dist/*
2 changes: 1 addition & 1 deletion Adafruit_IO/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.5.0"
__version__ = "0.0.0"
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
publish: clean
python setup.py sdist upload
publish: clean build
twine upload dist/*

clean:
#rm -rf Adafruit_BBIO.* build dist
Expand All @@ -9,7 +9,7 @@ tests:
py.test

build:
python setup.py build --force
python -m build

install: build
python setup.py install --force
pip install .
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Clone or download the contents of this repository. Then navigate to the folder i

.. code-block:: shell

python setup.py install
pip install .



Expand Down
Loading