First pass at upgrading to EAPI 3.
[g-pypi.git] / setup.py
1 #!/usr/bin/env python
2
3 'Create Gentoo ebuilds for Python packages by querying PyPI'
4
5 from distutils.core import setup, Command
6 import os.path
7
8 try:
9     import nose
10 except ImportError, e:
11     import sys
12     sys.stdout.write(str(e)+'\n')
13     nose = None
14
15 from g_pypi import __version__
16
17
18 if nose:  # add a `test` command
19     class TestCommand(Command):
20         description = "run the test suite with nose"
21         user_options = []
22
23         def initialize_options(self):
24             pass
25
26         def finalize_options(self):
27             pass
28
29         def run(self):
30             nose.run(argv=['setup.py test', '-vv', '.'])
31
32     cmdclass = {'test': TestCommand}
33 else:
34     cmdclass = {}
35
36
37 setup(
38     name='g-pypi',
39     license='GPL-2',
40     version=__version__,
41     description=__doc__,
42     long_description=open('README', 'r').read(),
43     maintainer='Rob Cakebread',
44     author='Rob Cakebread',
45     author_email='gentoodev@gmail.com',
46     url='http://code.google.com/p/g-pypi/',
47     keywords=('gentoo ebuilds PyPI setuptools cheeseshop distutils eggs '
48               'portage package management'),
49     classifiers=[
50         'Development Status :: 2 - Pre-Alpha',
51         'Intended Audience :: Developers',
52         'License :: OSI Approved :: GNU General Public License (GPL)',
53         'Programming Language :: Python',
54         'Topic :: Software Development :: Libraries :: Python Modules',
55         ],
56     packages=['g_pypi'],
57     provides=['g_pypi'],
58     requires=[
59         'Cheetah',
60         'gentoolkit',
61         'portage',
62         'Pygments',
63         'yolk',
64         ],
65     package_data={'g_pypi':['ebuild.tmpl']},
66     scripts=['scripts/g-pypi'],
67     cmdclass=cmdclass,
68 )