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

Use pyproject.toml for the project metadata (setuptools>=61) #1226

Merged
merged 3 commits into from
Mar 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,18 @@ jobs:
publish_branch: master
publish_dir: diofant.github.io-master
- name: Publish on Github Releases
uses: marvinpinto/action-automatic-releases@v1.2.1
uses: softprops/action-gh-release@v1
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') && matrix.coverage
with:
repo_token: ${{ secrets.RELEASES_DEPLOY_KEY }}
files: |
dist/*
build/sphinx/latex/Diofant-*.pdf
draft: true
title: "Diofant ${{ steps.release.outputs.version }}"
prerelease: true
name: "Diofant ${{ steps.release.outputs.version }}"
body: "See [release notes](https://diofant.readthedocs.io/\
en/latest/release/notes-${{ steps.release.outputs.short_version }}.html)."
token: ${{ secrets.RELEASES_DEPLOY_KEY }}
- name: Publish package on PyPI
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') && matrix.coverage
uses: pypa/gh-action-pypi-publish@v1.4.2
Expand Down
61 changes: 59 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,64 @@
[build-system]
requires = ['setuptools>=42', 'wheel', 'setuptools_scm[toml]>=6.0']
requires = ['pip>=20.3', 'setuptools>=61', 'wheel',
'setuptools_scm[toml]>=6.0']
build-backend = 'setuptools.build_meta'
[tool.setuptools_scm]

[project]
name = 'Diofant'
description = 'Computer algebra system (CAS) in Python'
keywords = ['Math', 'CAS']
license = {text = 'BSD'}
authors = [{name = 'Sergey B Kirpichev et al'}]
maintainers = [{name = 'Sergey B Kirpichev', email = 'diofant@googlegroups.com'}]
classifiers = ['Development Status :: 4 - Beta',
'Intended Audience :: Education',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Mathematics',
'Topic :: Scientific/Engineering :: Physics',
'Topic :: Software Development :: Libraries :: Python Modules',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: Implementation :: CPython']
requires-python = '>=3.10'
dependencies = ['mpmath>=1.2', 'packaging']
dynamic = ['version']
[project.readme]
file = 'docs/README.rst'
content-type = 'text/x-rst'
[project.urls]
Homepage = 'https://diofant.readthedocs.io/'
'Source Code' = 'https://github.com/diofant/diofant/'
'Bug Tracker' = 'https://github.com/diofant/diofant/issues/'
Download = 'https://github.com/diofant/diofant/releases/'
[project.optional-dependencies]
exports = ['numpy>=1.19', 'scipy>=1.6', 'cython']
gmpy = ['gmpy2>=2.1.0']
plot = ['matplotlib>=3.5.0']
interactive = ['ipykernel']
docs = ['sphinx>=4', 'sphinxcontrib-bibtex>=2.1', 'sphinxcontrib-autoprogram',
'sphinx_rtd_theme>=0.2']
tests = ['pytest>=6', 'hypothesis', 'pytest-timeout', 'pexpect']
develop = ['diofant[tests]', 'flake8>=3.8', 'flake8-docstrings>=1.3',
'pep8-naming', 'flake8-comprehensions', 'flake8-isort>=4.1',
'flake8-rst', 'flake8-quotes>=3', 'flake8-sfs', 'pytest-xdist>=1.22',
'pytest-cov', 'pylint>=2.13.1', 'coverage[toml]>=6.1.2',
'coverage_enable_subprocess', 'types-pkg_resources',
'mypy', 'build']
testing = ['diofant[develop]']
[tool.setuptools]
zip-safe = true
include-package-data = false
[tool.setuptools.packages]
find = {namespaces = false}
[tool.setuptools.package-data]
diofant = ['tests/logic/*.cnf']
[tool.setuptools.dynamic]
version = {attr = 'setuptools_scm.get_version'}
[tool.isort]
lines_after_imports = 2
skip = ['diofant/core/expr.py',
Expand Down
72 changes: 0 additions & 72 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,75 +1,3 @@
[metadata]
name = Diofant
version = attr: setuptools_scm.get_version
description = Computer algebra system (CAS) in Python
long_description = file: docs/README.rst
long_description_content_type = text/x-rst
keywords = Math, CAS
license = BSD
url = https://diofant.readthedocs.io/
project_urls = Source Code = https://github.com/diofant/diofant/
Bug Tracker = https://github.com/diofant/diofant/issues/
Download = https://github.com/diofant/diofant/releases/
author = Sergey B Kirpichev et al
maintainer = Sergey B Kirpichev
maintainer_email = diofant@googlegroups.com
classifiers = Development Status :: 4 - Beta
Intended Audience :: Education
Intended Audience :: Science/Research
License :: OSI Approved :: BSD License
Operating System :: OS Independent
Programming Language :: Python
Topic :: Scientific/Engineering
Topic :: Scientific/Engineering :: Mathematics
Topic :: Scientific/Engineering :: Physics
Topic :: Software Development :: Libraries :: Python Modules
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.10
Programming Language :: Python :: Implementation :: CPython
[options]
zip_safe = True
packages = find:
python_requires = >=3.10
setup_requires = setuptools>=52
pip>=20.3
install_requires = mpmath>=1.2
packaging
tests_require = diofant[develop]
[options.package_data]
diofant = tests/logic/*.cnf
[options.extras_require]
exports = numpy>=1.19
scipy>=1.6
cython
gmpy = gmpy2>=2.1.0
plot = matplotlib>=3.5.0
interactive = ipykernel
docs = sphinx>=4
sphinxcontrib-bibtex>=2.1
sphinxcontrib-autoprogram
sphinx_rtd_theme>=0.2
tests = pytest>=6
hypothesis
pytest-timeout
pexpect
develop = %(tests)s
flake8>=3.8
flake8-docstrings>=1.3
pep8-naming
flake8-comprehensions
flake8-isort>=4.1
flake8-rst
flake8-quotes>=3
flake8-sfs
pytest-xdist>=1.22
pytest-cov
pylint>=2.13.1
coverage[toml]>=6.1.2
coverage_enable_subprocess
types-pkg_resources
mypy
build
[flake8]
ignore = E201,E202,E226,E241,E402,W503,F402,F821,N801,N802,N803,N806,D402,
D103,D200,D100,D105,D205,D401,D102,D400,E741,D107,N807,W504,N815,
Expand Down