Skip to content

Commit 3520677

Browse files
Merge pull request #45 from rpanderson/declarative-setup
Declarative setup
2 parents e698194 + 5bc0639 commit 3520677

File tree

2 files changed

+51
-79
lines changed

2 files changed

+51
-79
lines changed

setup.cfg

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
[metadata]
2+
name = labscript_devices
3+
description = Device drivers for hardware controlled by the labscript suite
4+
long_description = file: README.md
5+
long_description_content_type = text/markdown
6+
author = The labscript suite community
7+
author_email = [email protected]
8+
url = http://labscriptsuite.org
9+
project_urls =
10+
Source Code=https://github.com/labscript-suite/labscript-devices
11+
Download=https://github.com/labscript-suite/labscript-devices/releases
12+
Tracker=https://github.com/labscript-suite/labscript-devices/issues
13+
keywords = experiment control automation
14+
license = BSD
15+
classifiers =
16+
License :: OSI Approved :: BSD License
17+
Programming Language :: Python :: 3 :: Only
18+
Programming Language :: Python :: 3.6
19+
Programming Language :: Python :: 3.7
20+
Programming Language :: Python :: 3.8
21+
22+
[options]
23+
zip_safe = False
24+
include_package_data = True
25+
packages = find:
26+
python_requires = >=3.6
27+
install_requires =
28+
blacs>=2.7.0
29+
labscript>=2.6.0
30+
labscript_utils>=2.13.2
31+
numpy>=1.15.1
32+
pillow
33+
PyDAQmx
34+
PyNIVision
35+
pyserial
36+
qtutils>=2.2.3
37+
spinapi
38+
zprocess>=2.18.0
39+
setup_requires =
40+
setuptools_scm
41+
42+
[dist_conda]
43+
pythons = 3.6, 3.7, 3.8

setup.py

Lines changed: 8 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,18 @@
1-
# USAGE NOTES
2-
#
3-
# Make a PyPI release tarball with:
4-
#
5-
# python setup.py sdist
6-
#
7-
# Upload to test PyPI with:
8-
#
9-
# twine upload --repository-url https://test.pypi.org/legacy/ dist/*
10-
#
11-
# Install from test PyPI with:
12-
#
13-
# pip install --index-url https://test.pypi.org/simple/ labscript_devices
14-
#
15-
# Upload to real PyPI with:
16-
#
17-
# twine upload dist/*
18-
#
19-
# Build conda packages for all platforms (in a conda environment with setuptools_conda
20-
# installed) with:
21-
#
22-
# python setup.py dist_conda
23-
#
24-
# Upoad to your own account (for testing) on anaconda cloud (in a conda environment with
25-
# anaconda-client installed) with:
26-
#
27-
# anaconda upload --skip-existing conda_packages/*/*
28-
#
29-
# (Trickier on Windows, as it won't expand the wildcards)
30-
#
31-
# Upoad to the labscript-suite organisation's channel on anaconda cloud (in a
32-
# conda environment with anaconda-client installed) with:
33-
#
34-
# anaconda upload -u labscript-suite --skip-existing conda_packages/*/*
35-
#
36-
# If you need to rebuild the same version of the package for conda due to a packaging
37-
# issue, you must increment CONDA_BUILD_NUMBER in order to create a unique version on
38-
# anaconda cloud. When subsequently releasing a new version of the package,
39-
# CONDA_BUILD_NUMBER should be reset to zero.
40-
411
import os
422
from setuptools import setup
433

444
try:
455
from setuptools_conda import dist_conda
6+
CMDCLASS = {"dist_conda": dist_conda}
467
except ImportError:
47-
dist_conda = None
48-
49-
SETUP_REQUIRES = ['setuptools', 'setuptools_scm']
8+
CMDCLASS = {}
509

51-
INSTALL_REQUIRES = [
52-
"labscript_utils >= 2.13.2",
53-
"blacs >= 2.7.0",
54-
"labscript >= 2.6.0",
55-
"qtutils >=2.2.3",
56-
"zprocess >=2.18.0",
57-
"numpy >=1.15.1",
58-
"pyserial",
59-
"pillow",
60-
"PyDAQmx",
61-
"PyNIVision",
62-
"spinapi",
63-
]
10+
VERSION_SCHEME = {
11+
"version_scheme": os.getenv("SCM_VERSION_SCHEME", "guess-next-dev"),
12+
"local_scheme": os.getenv("SCM_LOCAL_SCHEME", "node-and-date"),
13+
}
6414

6515
setup(
66-
name='labscript_devices',
67-
use_scm_version=True,
68-
description="Device drivers for the labscript suite",
69-
long_description=open('README.md').read(),
70-
long_description_content_type='text/markdown',
71-
author='The labscript suite community',
72-
author_email='[email protected] ',
73-
url='http://labscriptsuite.org',
74-
license="BSD",
75-
packages=["labscript_devices"],
76-
zip_safe=False,
77-
setup_requires=SETUP_REQUIRES,
78-
include_package_data=True,
79-
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5",
80-
install_requires=INSTALL_REQUIRES if 'CONDA_BUILD' not in os.environ else [],
81-
cmdclass={'dist_conda': dist_conda} if dist_conda is not None else {},
82-
command_options={
83-
'dist_conda': {
84-
'pythons': (__file__, ['3.6', '3.7', '3.8']),
85-
'platforms': (__file__, ['linux-64', 'win-32', 'win-64', 'osx-64']),
86-
'force_conversion': (__file__, True),
87-
},
88-
},
16+
use_scm_version=VERSION_SCHEME,
17+
cmdclass=CMDCLASS,
8918
)

0 commit comments

Comments
 (0)