Skip to content

Commit 601819b

Browse files
authored
🔨 migrate from setup.py to pyproject.toml (#42)
1 parent 0764c71 commit 601819b

File tree

13 files changed

+226
-235
lines changed

13 files changed

+226
-235
lines changed

.coveragerc

Lines changed: 0 additions & 2 deletions
This file was deleted.

.flake8

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[flake8]
2+
ignore = I100,I201,I202,D203,D401,W503,E203,F401,F403,C901,E501
3+
exclude = tests
4+
max-line-length = 88

.github/workflows/publish.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,30 +23,31 @@ jobs:
2323
id: compare
2424
run: |
2525
set -e
26-
VERSION=$(awk -F'"' '/__version__/ {print $2}' mysql-to-sqlite3/__version__.py)
26+
VERSION=$(awk -F'"' '/__version__/ {print $2}' mysql-to-sqlite3/__init__.py)
2727
TAG=${GITHUB_REF_NAME#v}
2828
if [[ "$VERSION" != "$TAG" ]]; then
2929
echo "Version in mysql-to-sqlite3/__version__.py ($VERSION) does not match tag ($TAG)"
3030
exit 1
3131
fi
3232
- name: Set up Python
33+
id: setup_python
3334
uses: actions/setup-python@v4
3435
with:
3536
python-version: "3.x"
36-
- name: Install dependencies
37+
- name: Install build dependencies
38+
id: install_build_dependencies
3739
run: |
3840
python3 -m pip install --upgrade pip
39-
pip install setuptools wheel
41+
pip install build setuptools wheel
4042
- name: Build a binary wheel and a source tarball
41-
run: |
42-
python3 setup.py sdist bdist_wheel
43-
- name: Publish distribution 📦 to Test PyPI
43+
id: build
44+
run: python3 build --sdist --wheel --outdir dist/ .
45+
- name: Publish distribution package to Test PyPI
46+
id: publish_test
4447
uses: pypa/gh-action-pypi-publish@release/v1
4548
with:
46-
verbose: true
4749
repository-url: https://test.pypi.org/legacy/
48-
- name: Publish distribution 📦 to PyPI
50+
- name: Publish distribution package to PyPI
51+
id: publish
4952
if: startsWith(github.ref, 'refs/tags')
5053
uses: pypa/gh-action-pypi-publish@release/v1
51-
with:
52-
verbose: true

0 commit comments

Comments
 (0)