setup.py

Wed, 01 Apr 2020 07:41:21 +0000

author
Nsukami Patrick <ptrck at nskm dot xyz>
date
Wed, 01 Apr 2020 07:41:21 +0000
changeset 110
d4bad9ab4c1c
parent 95
5d68eef8edf2
permissions
-rw-r--r--

[pkg] update Debian packaging

0
2da782396f91 first public release
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
1 #!/usr/bin/env python
95
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
2 # pylint: disable=W0142,W0403,W0404,W0613,W0622,W0622,W0704,R0904,C0103,E0611
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
3 #
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
4 # copyright 2003-2016 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
53
aecd4e6868c5 use is_instance instead of implements, and score_entity instead of rql_condition
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 32
diff changeset
5 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
95
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
6 #
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
7 # This file is part of a cubicweb-mailinglist.
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
8 #
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
9 # CubicWeb is free software: you can redistribute it and/or modify it under the
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
10 # terms of the GNU Lesser General Public License as published by the Free
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
11 # Software Foundation, either version 2.1 of the License, or (at your option)
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
12 # any later version.
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
13 #
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
14 # CubicWeb is distributed in the hope that it will be useful, but WITHOUT
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
15 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
16 # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
17 # details.
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
18 #
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
19 # You should have received a copy of the GNU Lesser General Public License
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
20 # along with CubicWeb. If not, see <http://www.gnu.org/licenses/>.
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
21 """cubicweb_mailinglist setup module using data from
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
22 cubicweb_mailinglist/__pkginfo__.py file
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
23 """
53
aecd4e6868c5 use is_instance instead of implements, and score_entity instead of rql_condition
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 32
diff changeset
24
95
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
25 from os.path import join, dirname
53
aecd4e6868c5 use is_instance instead of implements, and score_entity instead of rql_condition
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 32
diff changeset
26
95
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
27 from setuptools import find_packages, setup
53
aecd4e6868c5 use is_instance instead of implements, and score_entity instead of rql_condition
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 32
diff changeset
28
aecd4e6868c5 use is_instance instead of implements, and score_entity instead of rql_condition
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 32
diff changeset
29
95
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
30 here = dirname(__file__)
53
aecd4e6868c5 use is_instance instead of implements, and score_entity instead of rql_condition
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 32
diff changeset
31
95
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
32 # load metadata from the __pkginfo__.py file so there is no risk of conflict
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
33 # see https://packaging.python.org/en/latest/single_source_version.html
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
34 pkginfo = join(here, 'cubicweb_mailinglist', '__pkginfo__.py')
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
35 __pkginfo__ = {}
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
36 with open(pkginfo) as f:
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
37 exec(f.read(), __pkginfo__)
53
aecd4e6868c5 use is_instance instead of implements, and score_entity instead of rql_condition
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 32
diff changeset
38
95
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
39 # get required metadatas
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
40 distname = __pkginfo__['distname']
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
41 version = __pkginfo__['version']
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
42 license = __pkginfo__['license']
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
43 description = __pkginfo__['description']
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
44 web = __pkginfo__['web']
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
45 author = __pkginfo__['author']
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
46 author_email = __pkginfo__['author_email']
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
47 classifiers = __pkginfo__['classifiers']
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
48
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
49 with open(join(here, 'README')) as f:
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
50 long_description = f.read()
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
51
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
52 # get optional metadatas
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
53 data_files = __pkginfo__.get('data_files', None)
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
54 dependency_links = __pkginfo__.get('dependency_links', ())
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
55
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
56 requires = {}
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
57 for entry in ("__depends__",): # "__recommends__"):
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
58 requires.update(__pkginfo__.get(entry, {}))
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
59 install_requires = ["{0} {1}".format(d, v and v or "").strip()
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
60 for d, v in requires.items()]
53
aecd4e6868c5 use is_instance instead of implements, and score_entity instead of rql_condition
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 32
diff changeset
61
aecd4e6868c5 use is_instance instead of implements, and score_entity instead of rql_condition
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 32
diff changeset
62
95
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
63 setup(
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
64 name=distname,
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
65 version=version,
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
66 license=license,
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
67 description=description,
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
68 long_description=long_description,
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
69 author=author,
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
70 author_email=author_email,
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
71 url=web,
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
72 classifiers=classifiers,
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
73 packages=find_packages(exclude=['test']),
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
74 install_requires=install_requires,
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
75 include_package_data=True,
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
76 entry_points={
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
77 'cubicweb.cubes': [
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
78 'mailinglist=cubicweb_mailinglist',
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
79 ],
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
80 },
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
81 zip_safe=False,
5d68eef8edf2 [new style] Update cube to use new style
Nsukami Patrick <ptrck at nskm dot xyz>
parents: 93
diff changeset
82 )

mercurial