Blame view

setup.py 3.25 KB
Łukasz Nowak committed
1 2 3 4
from setuptools import setup, find_packages
import glob
import os

Sebastien Robin committed
5
version = '0.4.58'
Łukasz Nowak committed
6 7 8 9 10 11 12 13 14 15 16 17
name = 'erp5.util'
long_description = open("README.erp5.util.txt").read() + "\n"

for f in sorted(glob.glob(os.path.join('erp5', 'util', 'README.*.txt'))):
  long_description += '\n' + open(f).read() + '\n'

long_description += open("CHANGES.erp5.util.txt").read() + "\n"

# silence setuptools, create README.txt
if not os.path.exists('README.txt'):
  os.symlink('README.erp5.util.txt', 'README.txt')

Arnaud Fontaine committed
18 19 20 21 22 23 24 25
benchmark_install_require_list = [name+'[testbrowser]']

# argparse needed for erp5.util.benchmark is only available from python >= 2.7
import sys
python_major_version, python_minor_version = sys.version_info[:2]
if python_major_version == 2 and python_minor_version < 7:
  benchmark_install_require_list.append('argparse')

Arnaud Fontaine committed
26 27 28 29 30
# Only build/install erp5.util package, otherwise other directories may
# be considered as part of erp5.util (such as product)
package_list = ['erp5.%s' % subpackage for subpackage in find_packages('erp5')]
package_list.append('erp5')

Łukasz Nowak committed
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
setup(name=name,
      version=version,
      description="ERP5 related utilities.",
      long_description=long_description,
      classifiers=[
          "Development Status :: 2 - Pre-Alpha",
          "Environment :: Console",
          "Intended Audience :: Developers",
          "License :: OSI Approved :: GNU General Public License (GPL)",
          "Operating System :: POSIX",
          "Programming Language :: Python",
          "Topic :: Utilities",
        ],
      url='http://www.erp5.org',
      author='The ERP5 Development Team',
      keywords='erp5 utilities',
      license='GPLv3',
      namespace_packages=['erp5', 'erp5.util'],
      install_requires=[
        'setuptools', # namespaces
Sebastien Robin committed
51
        'psutil >= 0.5.0',
Łukasz Nowak committed
52
      ],
Łukasz Nowak committed
53
      extras_require={
Sebastien Robin committed
54
        'testnode': ['slapos.core', 'xml_marshaller', 'psutil >= 0.5.0'],
Arnaud Fontaine committed
55
        'testbrowser': ['zope.testbrowser >= 5.0.0', 'z3c.etestbrowser'],
Arnaud Fontaine committed
56
        'benchmark': benchmark_install_require_list,
Julien Muchembled committed
57 58
        'benchmark-report': [name+'[benchmark]', 'matplotlib', 'numpy'],
        'scalability_tester': [name+'[benchmark]', 'slapos.tool.nosqltester'],
Sebastien Robin committed
59
        'zodbanalyse': ['ZODB'],
Łukasz Nowak committed
60
      },
Łukasz Nowak committed
61
      zip_safe=True,
Arnaud Fontaine committed
62
      packages=package_list,
Łukasz Nowak committed
63 64 65
      include_package_data=True,
      entry_points={
        'console_scripts': [
Łukasz Nowak committed
66
          'testnode = erp5.util.testnode:main [testnode]',
Łukasz Nowak committed
67 68 69 70
          'performance_tester_erp5 = '\
            'erp5.util.benchmark.performance_tester:main [benchmark]',
          'scalability_tester_erp5 = '\
            'erp5.util.benchmark.scalability_tester:main [scalability_tester]',
Benjamin Blanc committed
71 72
          'runScalabilityTestSuite = '\
            'erp5.util.scalability.runScalabilityTestSuite:main',
Roque committed
73 74
          'requestUrl = '\
            'erp5.util.scalability.requestUrl:main',
Łukasz Nowak committed
75 76
          'generate_erp5_tester_report = '\
            'erp5.util.benchmark.report:generateReport [benchmark-report]',
Tatuya Kamada committed
77
          'web_checker_utility = erp5.util.webchecker:web_checker_utility'
Łukasz Nowak committed
78
        ],
Sebastien Robin committed
79
      },
Sebastien Robin committed
80 81 82 83
      test_suite='erp5.tests',
      tests_require=[
        'slapos.core',
        'xml_marshaller',
Sebastien Robin committed
84
        'psutil >= 0.5.0',
Sebastien Robin committed
85
      ],
Łukasz Nowak committed
86 87 88 89 90 91
    )

# cleanup garbage
if os.path.islink('README.txt'):
  if os.readlink('README.txt') == 'README.erp5.util.txt':
    os.unlink('README.txt')