Skip to content

Commit

Permalink
move versioningit config to pyprojec.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
jenshnielsen committed Mar 12, 2024
1 parent 535c63b commit da32095
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 25 deletions.
8 changes: 6 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[build-system]
requires = [
"setuptools >= 68.1.2",
"versioningit >= 2.0.1"
"versioningit >= 2.2.1"
]
build-backend = 'setuptools.build_meta'

Expand All @@ -20,7 +20,7 @@ classifiers = [
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering",]
requires-python = ">=3.9"
dependencies = [ "qcodes>=0.42.0", "versioningit>=2.0.1", "packaging", "pandas"]
dependencies = [ "qcodes>=0.42.0", "versioningit>=2.2.1", "packaging", "pandas"]
dynamic = [ "version",]

[[project.maintainers]]
Expand Down Expand Up @@ -95,6 +95,10 @@ license-files = [
"LICENSE",
]

[tool.setuptools.cmdclass]
sdist = "versioningit.cmdclass.sdist"
build_py = "versioningit.cmdclass.build_py"

[tool.versioningit]
default-version = "0.0"

Expand Down
28 changes: 5 additions & 23 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,8 @@
import setuptools
"""
This file only exists as a fallback for older versions of pip/setuptools
All configuration is done in pyproject.toml
"""
from setuptools import setup
from versioningit import get_cmdclasses

# this file does not contain configuration
# all config should be in pyproject.toml


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(),
)
setup()

0 comments on commit da32095

Please sign in to comment.