1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192
|
#!/usr/bin/env python
##############################################################################
##
# This file is part of Sardana
##
# http://www.sardana-controls.org/
##
# Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain
##
# Sardana is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
##
# Sardana is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
##
# You should have received a copy of the GNU Lesser General Public License
# along with Sardana. If not, see <http://www.gnu.org/licenses/>.
##
##############################################################################
import os
import sys
import importlib.util
from setuptools import setup
# Create new function find_namespace_packages to be compatible with
# setuptools < 40.1.0 (required for Debian 9).
# Remove this chunk of code and import find_namespace_packages from
# setuptools once we require setuptools >= 40.1.0
try:
from setuptools import find_namespace_packages
except ImportError:
from setuptools import PackageFinder
class PEP420PackageFinder(PackageFinder):
@staticmethod
def _looks_like_package(path):
return True
find_namespace_packages = PEP420PackageFinder.find
def get_release_info():
name = "release"
setup_dir = os.path.dirname(os.path.abspath(__file__))
release_dir = os.path.join(setup_dir, "src", "sardana", "release.py")
spec = importlib.util.spec_from_file_location(name, release_dir)
release = importlib.util.module_from_spec(spec)
spec.loader.exec_module(release)
return release
release = get_release_info()
package_dir = {"": "src"}
package_data = {"": ["*"]}
# Initially exclude sardana.config package. Add it later if python >= 3.6
packages = find_namespace_packages(where="src", exclude=('sardana.config*',))
provides = [
'sardana',
# 'sardana.pool',
# 'sardana.macroserver',
# 'sardana.spock',
# 'sardana.tango',
]
install_requires = [
'PyTango>=9.2.5', # could be moved to extras_require["tango"] if needed
'taurus >=5.1.4',
'lxml>=2.3',
'click',
'packaging'
]
extras_require_spock = [
"itango>=0.1.6",
]
extras_require_qt = [
"taurus[taurus-qt]",
]
extras_require_config = [
"ruamel.yaml>=0.18.3", # py36 support, see #1957
"dsconfig>=1.7.2",
"pydantic<2.0", # upgrade to 2.0 requires some work
"jsonpatch",
"graphviz",
]
extras_require_all = (
extras_require_spock
+ extras_require_qt
+ extras_require_config
)
extras_require = {
"spock": extras_require_spock,
"qt": extras_require_qt,
"config": extras_require_config,
"all": extras_require_all
}
console_scripts = [
"sardanactl = sardana.cli:main",
"MacroServer = sardana.tango.macroserver:main",
"Pool = sardana.tango.pool:main",
"Sardana = sardana.tango:main",
"spock = sardana.spock:main",
"diffractometeralignment = sardana.taurus.qt.qtgui.extra_hkl.diffractometeralignment:main",
"hklscan = sardana.taurus.qt.qtgui.extra_hkl.hklscan:main",
"macroexecutor = sardana.taurus.qt.qtgui.extra_macroexecutor.macroexecutor:_main",
"sequencer = sardana.taurus.qt.qtgui.extra_macroexecutor.sequenceeditor:_main",
"ubmatrix = sardana.taurus.qt.qtgui.extra_hkl.ubmatrix:main",
"showscan = sardana.taurus.qt.qtgui.extra_sardana.showscanonline:_main",
]
sardana_subcommands = [
"expconf = sardana.taurus.qt.qtgui.extra_sardana.expdescription:expconf_cmd",
"macroexecutor = sardana.taurus.qt.qtgui.extra_macroexecutor.macroexecutor:macroexecutor_cmd",
"sequencer = sardana.taurus.qt.qtgui.extra_macroexecutor.sequenceeditor.sequenceeditor:sequencer_cmd",
"showscan = sardana.taurus.qt.qtgui.extra_sardana.showscanonline:showscan_cmd",
"spock = sardana.spock:spock_cmd",
"expstatus = sardana.taurus.qt.qtgui.expstatus.expstatus:expstatus_cmd",
]
if sys.version_info >= (3, 6):
# Currently the config scripts don't support older python versions.
sardana_subcommands.append("config = sardana.config.config:config_grp")
packages = find_namespace_packages(where="src")
form_factories = [
"sardana.pool = sardana.taurus.qt.qtgui.extra_pool.formitemfactory:pool_item_factory" # noqa
]
pytest_plugins = [
"sardana_pool_plugins = sardana.pool.test.util"
]
entry_points = {
'console_scripts': console_scripts,
'sardana.cli.subcommands': sardana_subcommands,
'taurus.form.item_factories': form_factories,
'pytest11': pytest_plugins
}
classifiers = [
'Development Status :: 4 - Beta',
'Environment :: Console',
'Environment :: No Input/Output (Daemon)',
'Environment :: Win32 (MS Windows)',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX',
'Operating System :: POSIX :: Linux',
'Operating System :: Unix',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3.5',
'Topic :: Scientific/Engineering',
'Topic :: Software Development :: Libraries',
]
setup(name='sardana',
version=release.version,
description=release.description,
long_description=release.long_description,
author=release.authors['Tiago_et_al'][0],
maintainer=release.authors['Community'][0],
maintainer_email=release.authors['Community'][1],
url=release.url,
download_url=release.download_url,
platforms=release.platforms,
license=release.license,
keywords=release.keywords,
packages=packages,
package_dir=package_dir,
package_data=package_data,
classifiers=classifiers,
entry_points=entry_points,
provides=provides,
install_requires=install_requires,
extras_require=extras_require,
)
|