Skip to content

Commit 8036548

Browse files
committed
Simpler setuptools_scm and setuptools_conda usage
1 parent d61bd35 commit 8036548

File tree

2 files changed

+5
-15
lines changed

2 files changed

+5
-15
lines changed

setup.cfg

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,3 @@ console_scripts =
4444

4545
[dist_conda]
4646
pythons = 3.6, 3.7, 3.8
47-
platforms = linux-64,win-32,win-64,osx-64
48-
force_conversion = True

setup.py

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import os
22
from setuptools import setup
3-
from distutils import sysconfig
3+
from setuptools.dist import Distribution
44

55
try:
66
from setuptools_conda import dist_conda
7-
87
CMDCLASS = {"dist_conda": dist_conda}
98
except ImportError:
109
CMDCLASS = {}
@@ -20,17 +19,10 @@
2019
DATA_FILES = []
2120
PACKAGE_DATA = {"labscript_suite": [os.path.join("..", "labscript-suite.pth")]}
2221

23-
VERSION_SCHEME = {}
24-
VERSION_SCHEME["version_scheme"] = os.environ.get(
25-
"SCM_VERSION_SCHEME", "guess-next-dev"
26-
)
27-
VERSION_SCHEME["local_scheme"] = os.environ.get("SCM_LOCAL_SCHEME", "node-and-date")
28-
29-
VERSION_SCHEME = {}
30-
VERSION_SCHEME["version_scheme"] = os.environ.get(
31-
"SCM_VERSION_SCHEME", "release-branch-semver"
32-
)
33-
VERSION_SCHEME["local_scheme"] = os.environ.get("SCM_LOCAL_SCHEME", "node-and-date")
22+
VERSION_SCHEME = {
23+
"version_scheme": os.getenv("SCM_VERSION_SCHEME", "guess-next-dev"),
24+
"local_scheme": os.getenv("SCM_LOCAL_SCHEME", "node-and-date"),
25+
}
3426

3527
setup(
3628
use_scm_version=VERSION_SCHEME,

0 commit comments

Comments
 (0)