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

move pep621 standard config to pyproject.toml #178

Merged
merged 1 commit into from
Nov 16, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,40 @@
[build-system]
requires = [
"setuptools >= 56.0",
"setuptools >= 61.2",
"wheel >= 0.29.0",
"versioningit >= 1.1.0"
]
build-backend = 'setuptools.build_meta'

[project]
name = "qcodes_contrib_drivers"
description = "User contributed drivers for QCoDeS"
classifiers = [ "Development Status :: 3 - Alpha", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Topic :: Scientific/Engineering",]
requires-python = ">=3.8"
dependencies = [ "qcodes>=0.33.0", "versioningit>=1.1.0",]
dynamic = [ "version",]

[[project.maintainers]]
name = "QCoDeS Community"
email = "[email protected]"

[project.readme]
file = "README.rst"
content-type = "text/x-rst"

[project.license]
text = "MIT"

[project.urls]
Homepage = "https://github.com/QCoDeS/Qcodes_contrib_drivers"
Documentation = "https://qcodes.github.io/Qcodes_contrib_drivers/"
Source = "https://github.com/qcodes/qcodes_contrib_drivers"
Tracker = "https://github.com/QCoDeS/Qcodes_contrib_drivers/issues"

[project.optional-dependencies]
test = [ "pytest>=6.2.2", "pytest-mock", "mypy>=0.940", "pytest-cov>=3.0.0", "coverage[toml]>=6.2", "pyvisa-sim",]
docs = [ "sphinx", "sphinx_rtd_theme", "nbsphinx",]

[tool.mypy]
strict_optional = true
disallow_untyped_decorators = true
Expand Down
43 changes: 4 additions & 39 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,47 +1,12 @@
# note that only setuptools specific configuration is
# in this file. Std configuration as defined by pep621
# and configuration for other tools goes into pyproject.toml

[metadata]
name = qcodes_contrib_drivers
maintainer = QCoDeS Community
maintainer_email = [email protected]
description = User contributed drivers for QCoDeS
long_description = file: README.rst
long_description_content_type = text/x-rst
url = https://github.com/QCoDeS/Qcodes_contrib_drivers
classifiers =
Development Status :: 3 - Alpha
Intended Audience :: Science/Research
License :: OSI Approved :: MIT License
License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Topic :: Scientific/Engineering
license = MIT
license_files =
LICENSE_TEKTRONIX_AWG520_KEITHLEY_2700
LICENSE
project_urls =
Documentation = https://qcodes.github.io/Qcodes_contrib_drivers/
Source = https://github.com/qcodes/qcodes_contrib_drivers
Tracker = https://github.com/QCoDeS/Qcodes_contrib_drivers/issues

[options]
zip_safe = False
packages = find:
python_requires = >=3.8
install_requires =
qcodes>=0.33.0
versioningit>=1.1.0

[options.extras_require]
test =
pytest>=6.2.2
pytest-mock
mypy>=0.940
pytest-cov>=3.0.0
coverage[toml]>=6.2
pyvisa-sim
docs =
sphinx
sphinx_rtd_theme
nbsphinx
20 changes: 20 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
import setuptools
from setuptools import setup
from versioningit import get_cmdclasses

# this file does not contain configuration
# std configuration as defined by pep621
# is in pyproject.toml
# and setuptools specific config in setup.cfg

if int(setuptools.__version__.split(".")[0]) < 61:
raise RuntimeError(
"At least setuptools 61 is required to install qcodes-contrib-drivers from source"
)

try:
import pip

if int(pip.__version__.split(".")[0]) < 19:
raise RuntimeError("At least pip 19 is required to install qcodes-contrib-drivers from source")
except ImportError:
# we are not being executed from pip so pip version is not important
pass

if __name__ == "__main__":
setup(
cmdclass=get_cmdclasses(),
Expand Down