Commit 6e24c69a authored by Denis Laxalde's avatar Denis Laxalde
Browse files

[pkg] Declare extras (optional) dependencies

This is primary to extract "pyramid" dependencies out of install_requires
as they are actually optional. Along the way, resurrect all things in
__pkginfo__.__recommends__ which were not used at all and convert them
into extra_requires.

It appears that __depends__ and __recommends__ in __pkginfo__.py are
not useful so drop them and inline dependencies as
install_requires/extra_requires in setup function call.

For pyramid tests to continue working, add respective dependencies to
test-misc.txt requirements file.
parent 299640088c23
......@@ -43,42 +43,6 @@ classifiers = [
'Programming Language :: JavaScript',
]
__depends__ = {
'six': '>= 1.4.0',
'logilab-common': '>= 1.2.2',
'logilab-mtconverter': '>= 0.8.0',
'rql': '>= 0.34.0',
'yams': '>= 0.44.0',
#gettext # for xgettext, msgcat, etc...
# web dependencies
'lxml': '',
# XXX graphviz
# server dependencies
'logilab-database': '>= 1.15.0',
'passlib': '',
'pytz': '',
'Markdown': '',
'unittest2': '>= 0.7.0',
# pyramid dependencies
'pyramid': '>= 1.5.0',
'waitress': '>= 0.8.9',
'wsgicors': '>= 0.3',
'pyramid_multiauth': '',
}
__recommends__ = {
'docutils': '>= 0.6',
'Pillow': '', # for captcha
'pycrypto': '', # for crypto extensions
'fyzz': '>= 0.1.0', # for sparql
'vobject': '>= 0.6.0', # for ical view
'rdflib': None, #
'pyzmq': None,
'Twisted': '< 16.0.0',
#'Products.FCKeditor':'',
#'SimpleTAL':'>= 4.1.6',
}
scripts = [s for s in glob.glob(join('bin', 'cubicweb-*'))
if not s.endswith('.bat')]
include_dirs = [join('test', 'data'),
......
......@@ -20,5 +20,11 @@ flake8
## cubicweb/hooks/test
psycopg2
## cubicweb/pyramid/test
pyramid >= 1.5.0
waitress >= 0.8.9
wsgicors >= 0.3
pyramid_multiauth
## cubicweb/sobject/test
cubicweb-comment
......@@ -50,12 +50,6 @@ with io.open('README', encoding='utf-8') as f:
long_description = f.read()
# import optional features
requires = {}
for entry in ("__depends__",): # "__recommends__"):
requires.update(__pkginfo__.get(entry, {}))
install_requires = [("%s %s" % (d, v and v or "")).strip()
for d, v in requires.items()]
distname = __pkginfo__['distname']
scripts = __pkginfo__['scripts']
include_dirs = __pkginfo__['include_dirs']
......@@ -208,7 +202,51 @@ setup(
package_data=package_data,
scripts=ensure_scripts(scripts),
data_files=data_files,
install_requires=install_requires,
install_requires=[
'six >= 1.4.0',
'logilab-common >= 1.2.2',
'logilab-mtconverter >= 0.8.0',
'rql >= 0.34.0',
'yams >= 0.44.0',
'lxml',
'logilab-database >= 1.15.0',
'passlib',
'pytz',
'Markdown',
'unittest2 >= 0.7.0',
],
extra_requires={
'captcha': [
'Pillow',
],
'crypto': [
'pycrypto',
],
'etwist': [
'Twisted < 16.0.0',
],
'ext': [
'docutils >= 0.6',
],
'ical': [
'vobject >= 0.6.0',
],
'pyramid': [
'pyramid >= 1.5.0',
'waitress >= 0.8.9',
'wsgicors >= 0.3',
'pyramid_multiauth',
],
'rdf': [
'rdflib',
],
'sparql': [
'fyzz >= 0.1.0',
],
'zmq': [
'pyzmq',
],
},
cmdclass={'install_lib': MyInstallLib,
'install_data': MyInstallData},
zip_safe=False,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment