-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
switch from setup.py to pyproject.toml
- Loading branch information
Showing
4 changed files
with
81 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,27 @@ | ||
name: Upload Python Package | ||
name: Release | ||
|
||
# Only run for releases (tagged) | ||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
deploy: | ||
build-and-publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.7' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel twine | ||
- name: Build and publish | ||
env: | ||
TWINE_USERNAME: '__token__' | ||
TWINE_PASSWORD: ${{ secrets.pypi_password }} | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
twine upload dist/* | ||
python-version: '3.11' | ||
- name: Install build dependencies | ||
run: python -m pip install -U setuptools wheel build | ||
- name: Build | ||
run: python -m build . | ||
- name: Publish | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
skip-existing: true | ||
user: '__token__' | ||
password: ${{ secrets.pypi_password }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
[project] | ||
name = "pyais" | ||
dynamic = ["version"] | ||
description = "AIS message decoding" | ||
readme = "README.md" | ||
requires-python = ">=3.7" | ||
license = {file = "LICENSE"} | ||
keywords = ["AIS", "ship", "decoding", "NMEA", "maritime"] | ||
|
||
authors = [ | ||
{name = "Leon Morten Richter", email = "[email protected]" } | ||
] | ||
maintainers = [ | ||
{name = "Leon Morten Richter", email = "[email protected]" }] | ||
|
||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Topic :: Communications", | ||
"Topic :: System :: Networking", | ||
"Typing :: Typed", | ||
] | ||
|
||
dependencies = [ | ||
"bitarray", | ||
"attrs" | ||
] | ||
|
||
[project.optional-dependencies] | ||
dev = ['mypy', 'flake8', 'coverage', 'twine', 'sphinx', 'pytest', 'pytest-cov'] | ||
|
||
[project.urls] | ||
"Homepage" = "https://github.com/M0r13n/pyais" | ||
"Source" = "https://github.com/M0r13n/pyais" | ||
|
||
[project.scripts] | ||
ais-decode = "pyais.main:main" | ||
|
||
[tool.setuptools] | ||
package-data = {"pyais" = ["py.typed"]} | ||
|
||
|
||
[build-system] | ||
requires = ["setuptools>=43.0.0", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.setuptools.dynamic] | ||
version = {attr = "pyais.__version__"} |