setup.py
author Jérémy Bobbio <jeremy.bobbio@irq7.fr>
Wed, 05 Jun 2019 16:29:04 +0200
changeset 12642 5722d8c461eb
parent 12620 824105876352
child 12655 5b0ce10a7046
permissions -rw-r--r--
[pkg] Switch to Debian source format 3.0 (quilt) This forces us to base the Debian package on the source of the Python package (as produced by running `python3 setup.py sdist`). While it might seem cumbersome, this greatly reduces likelyhood of mismatch between an installation via `pip` and one using the Debian package. `dpkg-source` will also document for us what is currently in the source repository but not in the Python package. Currently the missing file are: PKG-INFO cubicweb/sobjects/test/data/cubicweb_comment/schema.py cubicweb/sobjects/test/data/cubicweb_comment/__init__.py cubicweb/sobjects/test/data/cubicweb_comment/__pkginfo__.py cubicweb/sobjects/test/data/cubicweb_card/schema.py cubicweb/sobjects/test/data/cubicweb_card/entities.py cubicweb/sobjects/test/data/cubicweb_card/__init__.py cubicweb/sobjects/test/data/cubicweb_card/__pkginfo__.py cubicweb/server/test/data-migractions/cubicweb_comment/schema.py cubicweb/server/test/data-migractions/cubicweb_comment/__init__.py cubicweb/server/test/data-migractions/cubicweb_comment/__pkginfo__.py cubicweb/server/test/data-migractions/cubicweb_localperms/schema.py cubicweb/server/test/data-migractions/cubicweb_localperms/__init__.py cubicweb/server/test/data-migractions/cubicweb_localperms/__pkginfo__.py cubicweb/server/test/data-migractions/cubicweb_basket/schema.py cubicweb/server/test/data-migractions/cubicweb_basket/__init__.py cubicweb/server/test/data-migractions/cubicweb_basket/__pkginfo__.py cubicweb/server/test/data-migractions/migratedapp/cubicweb_comment/schema.py cubicweb/server/test/data-migractions/migratedapp/cubicweb_comment/__init__.py cubicweb/server/test/data-migractions/migratedapp/cubicweb_comment/__pkginfo__.py cubicweb/server/test/data-migractions/migratedapp/cubicweb_localperms/schema.py cubicweb/server/test/data-migractions/migratedapp/cubicweb_localperms/__init__.py cubicweb/server/test/data-migractions/migratedapp/cubicweb_localperms/__pkginfo__.py cubicweb/server/test/data-migractions/migratedapp/cubicweb_basket/schema.py cubicweb/server/test/data-migractions/migratedapp/cubicweb_basket/__init__.py cubicweb/server/test/data-migractions/migratedapp/cubicweb_basket/__pkginfo__.py cubicweb/server/test/data-migractions/migratedapp/cubicweb_tag/schema.py cubicweb/server/test/data-migractions/migratedapp/cubicweb_tag/__init__.py cubicweb/server/test/data-migractions/migratedapp/cubicweb_tag/__pkginfo__.py cubicweb/server/test/data-migractions/migratedapp/cubicweb_card/schema.py cubicweb/server/test/data-migractions/migratedapp/cubicweb_card/__init__.py cubicweb/server/test/data-migractions/migratedapp/cubicweb_card/__pkginfo__.py cubicweb/server/test/data-migractions/migratedapp/cubicweb_file/schema.py cubicweb/server/test/data-migractions/migratedapp/cubicweb_file/__init__.py cubicweb/server/test/data-migractions/migratedapp/cubicweb_file/__pkginfo__.py cubicweb/server/test/data-migractions/cubicweb_tag/schema.py cubicweb/server/test/data-migractions/cubicweb_tag/__init__.py cubicweb/server/test/data-migractions/cubicweb_tag/__pkginfo__.py cubicweb/server/test/data-migractions/cubicweb_card/schema.py cubicweb/server/test/data-migractions/cubicweb_card/__init__.py cubicweb/server/test/data-migractions/cubicweb_card/__pkginfo__.py cubicweb/server/test/data-migractions/cubicweb_file/schema.py cubicweb/server/test/data-migractions/cubicweb_file/__init__.py cubicweb/server/test/data-migractions/cubicweb_file/__pkginfo__.py cubicweb/test/data-rewrite/cubicweb_localperms/schema.py cubicweb/test/data-rewrite/cubicweb_localperms/__init__.py cubicweb/test/data-rewrite/cubicweb_localperms/__pkginfo__.py cubicweb/test/data-rewrite/cubicweb_card/schema.py cubicweb/test/data-rewrite/cubicweb_card/entities.py cubicweb/test/data-rewrite/cubicweb_card/__init__.py cubicweb/test/data-rewrite/cubicweb_card/__pkginfo__.py The current manifest will duplicate several files that are stored as symlinks in the Mercurial repository, hence the long list of ignored files in `extend-diff-ignore`.

#!/usr/bin/env python
# pylint: disable=W0142,W0403,W0404,W0613,W0622,W0622,W0704,R0904,C0103,E0611
#
# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This file is part of CubicWeb.
#
# CubicWeb 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 2.1 of the License, or (at your option)
# any later version.
#
# CubicWeb 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 CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
"""Generic Setup script, takes package info from __pkginfo__.py file
"""

import io
from os.path import dirname, join

from setuptools import setup, find_packages


here = dirname(__file__)

# import required features
pkginfo = join(here, 'cubicweb', '__pkginfo__.py')
__pkginfo__ = {}
with open(pkginfo) as f:
    exec(f.read(), __pkginfo__)
modname = __pkginfo__['modname']
version = __pkginfo__['version']
license = __pkginfo__['license']
description = __pkginfo__['description']
web = __pkginfo__['web']
author = __pkginfo__['author']
author_email = __pkginfo__['author_email']

with io.open('README', encoding='utf-8') as f:
    long_description = f.read()

# import optional features
distname = __pkginfo__['distname']
package_data = __pkginfo__['package_data']


setup(
    name=distname,
    version=version,
    license=license,
    url=web,
    description=description,
    long_description=long_description,
    author=author,
    author_email=author_email,
    packages=find_packages(),
    package_data=package_data,
    include_package_data=True,
    install_requires=[
        'logilab-common >= 1.4.0',
        'logilab-mtconverter >= 0.8.0',
        'rql >= 0.34.0',
        'yams >= 0.45.0',
        'lxml',
        'logilab-database >= 1.15.0',
        'passlib >= 1.7',
        'pytz',
        'Markdown',
        'filelock',
    ],
    entry_points={
        'console_scripts': [
            'cubicweb-ctl = cubicweb.cwctl:run',
        ],
        'paste.app_factory': [
            'pyramid_main=cubicweb.pyramid:pyramid_app',
        ],
    },
    extras_require={
        'captcha': [
            'Pillow',
        ],
        'crypto': [
            'pycryptodome',
        ],
        'ext': [
            'docutils >= 0.6',
        ],
        'ical': [
            'vobject >= 0.6.0',
        ],
        'pyramid': [
            'pyramid >= 1.5.0',
            'waitress >= 0.8.9',
            'wsgicors >= 0.3',
            'pyramid_multiauth',
            'repoze.lru',
        ],
        'rdf': [
            'rdflib',
        ],
        'sparql': [
            'fyzz >= 0.1.0',
        ],
        'zmq': [
            'pyzmq',
        ],
    },
    zip_safe=False,
)