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

pyproject.toml migration #148

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
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
14 changes: 9 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,24 @@ jobs:
environment:
name: IO
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python 3.6
uses: actions/setup-python@v1
- name: Set up Python 3.x
uses: actions/setup-python@v4
with:
python-version: 3.6
python-version: 3.x

- name: Install dependencies
run: |
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"
1 change: 0 additions & 1 deletion MANIFEST.in

This file was deleted.

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
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = "en"

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand Down
Loading
Loading