setup.py
author Jérémy Bobbio <jeremy.bobbio@irq7.fr>
Wed, 19 Jun 2019 15:44:17 +0200
changeset 12655 5b0ce10a7046
parent 12620 824105876352
child 12767 d50661367401
permissions -rw-r--r--
[crypto] Use Cryptodome namespace instead of Crypto PyCryptodome comes in two flavors: “an almost drop-in replacement for the old PyCrypto library” and “a library independent of the old PyCrypto”. The former uses the Crypto namespace, and is shipped as `pycryptodome` while the latter uses Cryptodome instead and lies in the `pycryptodomex` package. Given the reason to switch to PyCryptodome is that PyCrypto in unmaintained, its probably better to avoid any mistake and mandate the specific usage of the Cryptodome namespace by requiring `pycryptodomex` instead of `pycryptodome`. A more present reason is that Debian buster will only provide a package with the separate namespace flavor. The current Recommends is not working with the current code. Although it's important to note that the package name will probably have to be changed to `python3-pycryptodomex` once https://bugs.debian.org/886291 is solved.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     1
#!/usr/bin/env python
6491
ee9a10b6620e pylint option update
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 6327
diff changeset
     2
# pylint: disable=W0142,W0403,W0404,W0613,W0622,W0622,W0704,R0904,C0103,E0611
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     3
#
7879
9aae456abab5 [pylint] fix pylint detected errors and tweak it so that pylint -E will be much less verbose next time (+ update some copyrights on the way)
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 6836
diff changeset
     4
# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
5421
8167de96c523 proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 4721
diff changeset
     5
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
8167de96c523 proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 4721
diff changeset
     6
#
8167de96c523 proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 4721
diff changeset
     7
# This file is part of CubicWeb.
8167de96c523 proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 4721
diff changeset
     8
#
8167de96c523 proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 4721
diff changeset
     9
# CubicWeb is free software: you can redistribute it and/or modify it under the
8167de96c523 proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 4721
diff changeset
    10
# terms of the GNU Lesser General Public License as published by the Free
8167de96c523 proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 4721
diff changeset
    11
# Software Foundation, either version 2.1 of the License, or (at your option)
8167de96c523 proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 4721
diff changeset
    12
# any later version.
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    13
#
5424
8ecbcbff9777 replace logilab-common by CubicWeb in disclaimer
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 5421
diff changeset
    14
# CubicWeb is distributed in the hope that it will be useful, but WITHOUT
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    15
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
5421
8167de96c523 proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 4721
diff changeset
    16
# FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
8167de96c523 proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 4721
diff changeset
    17
# details.
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    18
#
5421
8167de96c523 proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 4721
diff changeset
    19
# You should have received a copy of the GNU Lesser General Public License along
8167de96c523 proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 4721
diff changeset
    20
# with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
8167de96c523 proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 4721
diff changeset
    21
"""Generic Setup script, takes package info from __pkginfo__.py file
8167de96c523 proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 4721
diff changeset
    22
"""
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    23
11276
6eeb7abda47a [pkg] Use io.open with utf-8 encoding to read long description from README
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11057
diff changeset
    24
import io
12257
39cd3c7eb2e8 [pkg] Use setuptools.find_packages()
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 12256
diff changeset
    25
from os.path import dirname, join
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    26
12257
39cd3c7eb2e8 [pkg] Use setuptools.find_packages()
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 12256
diff changeset
    27
from setuptools import setup, find_packages
12255
08628d6d57ee [pkg] Drop custom "install_data" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 12254
diff changeset
    28
5024
9e718abe3fde add egg support with dependencies auto-installation
Alain Leufroy <alain.leufroy@logilab.fr>
parents: 4721
diff changeset
    29
11057
0b59724cb3f2 Reorganize source tree to have a "cubicweb" top-level package
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 10662
diff changeset
    30
here = dirname(__file__)
0b59724cb3f2 Reorganize source tree to have a "cubicweb" top-level package
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 10662
diff changeset
    31
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    32
# import required features
11057
0b59724cb3f2 Reorganize source tree to have a "cubicweb" top-level package
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 10662
diff changeset
    33
pkginfo = join(here, 'cubicweb', '__pkginfo__.py')
0b59724cb3f2 Reorganize source tree to have a "cubicweb" top-level package
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 10662
diff changeset
    34
__pkginfo__ = {}
0b59724cb3f2 Reorganize source tree to have a "cubicweb" top-level package
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 10662
diff changeset
    35
with open(pkginfo) as f:
0b59724cb3f2 Reorganize source tree to have a "cubicweb" top-level package
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 10662
diff changeset
    36
    exec(f.read(), __pkginfo__)
0b59724cb3f2 Reorganize source tree to have a "cubicweb" top-level package
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 10662
diff changeset
    37
modname = __pkginfo__['modname']
0b59724cb3f2 Reorganize source tree to have a "cubicweb" top-level package
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 10662
diff changeset
    38
version = __pkginfo__['version']
0b59724cb3f2 Reorganize source tree to have a "cubicweb" top-level package
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 10662
diff changeset
    39
license = __pkginfo__['license']
0b59724cb3f2 Reorganize source tree to have a "cubicweb" top-level package
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 10662
diff changeset
    40
description = __pkginfo__['description']
0b59724cb3f2 Reorganize source tree to have a "cubicweb" top-level package
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 10662
diff changeset
    41
web = __pkginfo__['web']
0b59724cb3f2 Reorganize source tree to have a "cubicweb" top-level package
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 10662
diff changeset
    42
author = __pkginfo__['author']
0b59724cb3f2 Reorganize source tree to have a "cubicweb" top-level package
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 10662
diff changeset
    43
author_email = __pkginfo__['author_email']
5024
9e718abe3fde add egg support with dependencies auto-installation
Alain Leufroy <alain.leufroy@logilab.fr>
parents: 4721
diff changeset
    44
11276
6eeb7abda47a [pkg] Use io.open with utf-8 encoding to read long description from README
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11057
diff changeset
    45
with io.open('README', encoding='utf-8') as f:
6eeb7abda47a [pkg] Use io.open with utf-8 encoding to read long description from README
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11057
diff changeset
    46
    long_description = f.read()
5024
9e718abe3fde add egg support with dependencies auto-installation
Alain Leufroy <alain.leufroy@logilab.fr>
parents: 4721
diff changeset
    47
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    48
# import optional features
11449
ea5299828d68 [pkg] Make it clearer which entries of __pkginfo__ are actually used
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11426
diff changeset
    49
distname = __pkginfo__['distname']
ea5299828d68 [pkg] Make it clearer which entries of __pkginfo__ are actually used
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11426
diff changeset
    50
package_data = __pkginfo__['package_data']
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    51
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    52
11467
629d9e35ce28 [pkg] Inline call to setup() in setup.py
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11466
diff changeset
    53
setup(
629d9e35ce28 [pkg] Inline call to setup() in setup.py
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11466
diff changeset
    54
    name=distname,
629d9e35ce28 [pkg] Inline call to setup() in setup.py
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11466
diff changeset
    55
    version=version,
629d9e35ce28 [pkg] Inline call to setup() in setup.py
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11466
diff changeset
    56
    license=license,
629d9e35ce28 [pkg] Inline call to setup() in setup.py
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11466
diff changeset
    57
    url=web,
629d9e35ce28 [pkg] Inline call to setup() in setup.py
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11466
diff changeset
    58
    description=description,
629d9e35ce28 [pkg] Inline call to setup() in setup.py
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11466
diff changeset
    59
    long_description=long_description,
629d9e35ce28 [pkg] Inline call to setup() in setup.py
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11466
diff changeset
    60
    author=author,
629d9e35ce28 [pkg] Inline call to setup() in setup.py
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11466
diff changeset
    61
    author_email=author_email,
12257
39cd3c7eb2e8 [pkg] Use setuptools.find_packages()
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 12256
diff changeset
    62
    packages=find_packages(),
11467
629d9e35ce28 [pkg] Inline call to setup() in setup.py
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11466
diff changeset
    63
    package_data=package_data,
12252
64c4edac1706 [pkg] Drop custom install_lib command and use include_package_data instead
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 12193
diff changeset
    64
    include_package_data=True,
11685
6c263b8091d3 [pkg] Declare extras (optional) dependencies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11467
diff changeset
    65
    install_requires=[
12069
82f7d583e5a3 [pkg] Depends on logilab-common >= 1.4.0
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11987
diff changeset
    66
        'logilab-common >= 1.4.0',
11685
6c263b8091d3 [pkg] Declare extras (optional) dependencies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11467
diff changeset
    67
        'logilab-mtconverter >= 0.8.0',
6c263b8091d3 [pkg] Declare extras (optional) dependencies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11467
diff changeset
    68
        'rql >= 0.34.0',
12070
a44f67dd0474 [pkg] Depends on yams >= 0.45.0
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 12069
diff changeset
    69
        'yams >= 0.45.0',
11685
6c263b8091d3 [pkg] Declare extras (optional) dependencies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11467
diff changeset
    70
        'lxml',
6c263b8091d3 [pkg] Declare extras (optional) dependencies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11467
diff changeset
    71
        'logilab-database >= 1.15.0',
12574
6ccf8fda063f [mod] remove backward compatible code for passlib and force modern version
Laurent Peuch <cortex@worlddomination.be>
parents: 12567
diff changeset
    72
        'passlib >= 1.7',
11685
6c263b8091d3 [pkg] Declare extras (optional) dependencies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11467
diff changeset
    73
        'pytz',
6c263b8091d3 [pkg] Declare extras (optional) dependencies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11467
diff changeset
    74
        'Markdown',
12357
e385c9732f1e Make test database template creation concurrent
Philippe Pepiot <philippe.pepiot@logilab.fr>
parents: 12272
diff changeset
    75
        'filelock',
11685
6c263b8091d3 [pkg] Declare extras (optional) dependencies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11467
diff changeset
    76
    ],
11968
bb0dfc7d2d0e [skeleton,pyramid] Move pyramid app definition in cubicweb.pyramid module
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11929
diff changeset
    77
    entry_points={
12254
2060ee44ea9a [pkg] Replace custom "scripts" handling by a setuptools entry points
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 12252
diff changeset
    78
        'console_scripts': [
2060ee44ea9a [pkg] Replace custom "scripts" handling by a setuptools entry points
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 12252
diff changeset
    79
            'cubicweb-ctl = cubicweb.cwctl:run',
2060ee44ea9a [pkg] Replace custom "scripts" handling by a setuptools entry points
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 12252
diff changeset
    80
        ],
11968
bb0dfc7d2d0e [skeleton,pyramid] Move pyramid app definition in cubicweb.pyramid module
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11929
diff changeset
    81
        'paste.app_factory': [
12073
339b26bf17d2 [pyramid] Rename paste app factory to pyramid_main
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 12070
diff changeset
    82
            'pyramid_main=cubicweb.pyramid:pyramid_app',
11968
bb0dfc7d2d0e [skeleton,pyramid] Move pyramid app definition in cubicweb.pyramid module
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11929
diff changeset
    83
        ],
bb0dfc7d2d0e [skeleton,pyramid] Move pyramid app definition in cubicweb.pyramid module
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11929
diff changeset
    84
    },
11805
7436b65a44bc [pkg] Fix extra packages not installable
Florent Cayré <florent.cayre@gmail.com>
parents: 11752
diff changeset
    85
    extras_require={
11685
6c263b8091d3 [pkg] Declare extras (optional) dependencies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11467
diff changeset
    86
        'captcha': [
6c263b8091d3 [pkg] Declare extras (optional) dependencies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11467
diff changeset
    87
            'Pillow',
6c263b8091d3 [pkg] Declare extras (optional) dependencies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11467
diff changeset
    88
        ],
6c263b8091d3 [pkg] Declare extras (optional) dependencies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11467
diff changeset
    89
        'crypto': [
12655
5b0ce10a7046 [crypto] Use Cryptodome namespace instead of Crypto
Jérémy Bobbio <jeremy.bobbio@irq7.fr>
parents: 12620
diff changeset
    90
            'pycryptodomex',
11685
6c263b8091d3 [pkg] Declare extras (optional) dependencies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11467
diff changeset
    91
        ],
6c263b8091d3 [pkg] Declare extras (optional) dependencies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11467
diff changeset
    92
        'ext': [
6c263b8091d3 [pkg] Declare extras (optional) dependencies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11467
diff changeset
    93
            'docutils >= 0.6',
6c263b8091d3 [pkg] Declare extras (optional) dependencies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11467
diff changeset
    94
        ],
6c263b8091d3 [pkg] Declare extras (optional) dependencies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11467
diff changeset
    95
        'ical': [
6c263b8091d3 [pkg] Declare extras (optional) dependencies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11467
diff changeset
    96
            'vobject >= 0.6.0',
6c263b8091d3 [pkg] Declare extras (optional) dependencies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11467
diff changeset
    97
        ],
6c263b8091d3 [pkg] Declare extras (optional) dependencies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11467
diff changeset
    98
        'pyramid': [
6c263b8091d3 [pkg] Declare extras (optional) dependencies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11467
diff changeset
    99
            'pyramid >= 1.5.0',
6c263b8091d3 [pkg] Declare extras (optional) dependencies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11467
diff changeset
   100
            'waitress >= 0.8.9',
6c263b8091d3 [pkg] Declare extras (optional) dependencies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11467
diff changeset
   101
            'wsgicors >= 0.3',
6c263b8091d3 [pkg] Declare extras (optional) dependencies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11467
diff changeset
   102
            'pyramid_multiauth',
11987
d432911e3c26 [pyramid] Drop module-level cache and cleanup looping tasks in tools
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11968
diff changeset
   103
            'repoze.lru',
11685
6c263b8091d3 [pkg] Declare extras (optional) dependencies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11467
diff changeset
   104
        ],
6c263b8091d3 [pkg] Declare extras (optional) dependencies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11467
diff changeset
   105
        'rdf': [
6c263b8091d3 [pkg] Declare extras (optional) dependencies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11467
diff changeset
   106
            'rdflib',
6c263b8091d3 [pkg] Declare extras (optional) dependencies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11467
diff changeset
   107
        ],
6c263b8091d3 [pkg] Declare extras (optional) dependencies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11467
diff changeset
   108
        'sparql': [
6c263b8091d3 [pkg] Declare extras (optional) dependencies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11467
diff changeset
   109
            'fyzz >= 0.1.0',
6c263b8091d3 [pkg] Declare extras (optional) dependencies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11467
diff changeset
   110
        ],
6c263b8091d3 [pkg] Declare extras (optional) dependencies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11467
diff changeset
   111
        'zmq': [
6c263b8091d3 [pkg] Declare extras (optional) dependencies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11467
diff changeset
   112
            'pyzmq',
6c263b8091d3 [pkg] Declare extras (optional) dependencies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11467
diff changeset
   113
        ],
6c263b8091d3 [pkg] Declare extras (optional) dependencies
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11467
diff changeset
   114
    },
11467
629d9e35ce28 [pkg] Inline call to setup() in setup.py
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11466
diff changeset
   115
    zip_safe=False,
629d9e35ce28 [pkg] Inline call to setup() in setup.py
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11466
diff changeset
   116
)