Skip to content

Commit

Permalink
Merge pull request Nitrate#1144 from tkdchen/use-pyproject-toml
Browse files Browse the repository at this point in the history
Use pyproject toml
  • Loading branch information
tkdchen authored Jul 2, 2023
2 parents 23f7d1b + b3e3c20 commit a09acec
Show file tree
Hide file tree
Showing 6 changed files with 103 additions and 89 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/distribution.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: python setup.py sdist
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@master
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: make sdist
run: |
python3 -m venv venv
./venv/bin/pip install build
./venv/bin/python3 -m build --sdist
- name: Publish sdist package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_token }}
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
.vagrant/
.tox/
.env/
.venv/
.pytest_cache/
TAGS
build/
Expand All @@ -26,6 +27,7 @@ tcms/toys.py
cover-report/
htmlcov/
.cache/
.dccache
./install/
uploads/
Vagrantfile
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ graft src/static
graft src/templates
graft tests

include docs/Makefile docs/requirements.txt docs/make.bat
include docs/Makefile docs/make.bat
graft docs/source

global-exclude *.pyc
90 changes: 90 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,96 @@
[build-system]
requires = ["setuptools", "wheel"]

[project]
name = "nitrate-tcms"
description = "A full-featured Test Case Management System"
readme = "README.rst"
authors = [
{name = "Nitrate Team"}
]
maintainers = [
{name = "Chenxiong Qi", email = "qcxhome@gmail.com"}
]
license = {text = "GPLv2+"}
keywords = ["test", "case", "plan", "run"]
requires-python = ">=3.9"
classifiers = [
"Framework :: Django",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.2",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Software Development :: Quality Assurance",
"Topic :: Software Development :: Testing"
]
dependencies = [
"beautifulsoup4==4.11.1",
"django>=3.2,<4",
"django-contrib-comments==2.2.0",
"django-tinymce==3.5.0",
"django-uuslug==2.0.0",
"html2text==2020.1.16",
"odfpy==1.4.1",
"xmltodict==0.13.0",
"kobo==0.25.0",
]
dynamic = ["version"]

[project.optional-dependencies]
mysql = ["mysqlclient==2.1.1"]
pgsql = ["psycopg2-binary==2.9.5"]
krbauth = ["kerberos==1.3.0"]
bugzilla = ["python-bugzilla==3.2.0"]
socialauth = ["social-auth-app-django==5.0.0"]
async = ["celery==5.2.6"]
docs = ["Sphinx >= 1.1.2", "sphinx_rtd_theme"]
devtools = [
"black",
"django-debug-toolbar",
"django-stubs",
"tox",
# Build tool to build sdist: python3 -m build
"build",
]
tests = [
"beautifulsoup4==4.11.1",
"coverage[toml]",
"factory_boy",
"flake8",
"pytest",
"pytest-cov",
"pytest-django",
"sqlparse",
"tox",
"tox-docker>=2.0.0",
]

[project.urls]
Repository = "https://github.com/Nitrate/Nitrate"
Documentation = "https://nitrate.readthedocs.io/"
"Issue Tracker" = "https://github.com/Nitrate/Nitrate/issues"
"Source Code" = "https://github.com/Nitrate/Nitrate"
"Release Notes" = "https://nitrate.readthedocs.io/en/latest/releases/"
"Container Images" = "https://quay.io/organization/nitrate"

[tool.setuptools]
platforms = ["any"]
zip-safe = false
include-package-data = true

[tool.setuptools.dynamic]
version = {file = "VERSION.txt"}

[tool.setuptools.packages.find]
where = ["src"]
exclude = ["tests*"]
namespaces = false

[tool.black]
line-length = 100
target-version = ['py310']
Expand Down
82 changes: 0 additions & 82 deletions setup.cfg

This file was deleted.

3 changes: 0 additions & 3 deletions setup.py

This file was deleted.

0 comments on commit a09acec

Please sign in to comment.