diff options
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 67 |
1 files changed, 8 insertions, 59 deletions
@@ -1,77 +1,26 @@ | |||
1 | #!/usr/bin/env python | 1 | #!/usr/bin/env python |
2 | # -*- coding: utf-8 -*- | 2 | # -*- coding: utf-8 -*- |
3 | import os | ||
4 | import codecs | ||
5 | |||
6 | try: | ||
7 | from setuptools import setup, find_packages | ||
8 | except ImportError: | ||
9 | from ez_setup import use_setuptools | ||
10 | use_setuptools() | ||
11 | from setuptools import setup, find_packages | ||
12 | |||
13 | from distutils.command.install_data import install_data | ||
14 | from distutils.command.install import INSTALL_SCHEMES | ||
15 | import sys | ||
16 | |||
17 | djangopypi = __import__('djangopypi', {}, {}, ['']) | ||
18 | |||
19 | packages, data_files = [], [] | ||
20 | root_dir = os.path.dirname(__file__) | ||
21 | if root_dir != '': | ||
22 | os.chdir(root_dir) | ||
23 | djangopypi_dir = "djangopypi" | ||
24 | |||
25 | def osx_install_data(install_data): | ||
26 | def finalize_options(self): | ||
27 | self.set_undefined_options("install", ("install_lib", "install_dir")) | ||
28 | install_data.finalize_options(self) | ||
29 | |||
30 | #if sys.platform == "darwin": | ||
31 | # cmdclasses = {'install_data': osx_install_data} | ||
32 | #else: | ||
33 | # cmdclasses = {'install_data': install_data} | ||
34 | |||
35 | |||
36 | def fullsplit(path, result=None): | ||
37 | if result is None: | ||
38 | result = [] | ||
39 | head, tail = os.path.split(path) | ||
40 | if head == '': | ||
41 | return [tail] + result | ||
42 | if head == path: | ||
43 | return result | ||
44 | return fullsplit(head, [tail] + result) | ||
45 | |||
46 | |||
47 | for scheme in INSTALL_SCHEMES.values(): | ||
48 | scheme['data'] = scheme['purelib'] | ||
49 | 3 | ||
4 | import codecs | ||
5 | import djangopypi | ||
6 | from setuptools import setup, find_packages | ||
50 | 7 | ||
51 | for dirpath, dirnames, filenames in os.walk(djangopypi_dir): | ||
52 | # Ignore dirnames that start with '.' | ||
53 | for i, dirname in enumerate(dirnames): | ||
54 | if dirname.startswith("."): del dirnames[i] | ||
55 | for filename in filenames: | ||
56 | if filename.endswith(".py"): | ||
57 | packages.append('.'.join(fullsplit(dirpath))) | ||
58 | else: | ||
59 | data_files.append([dirpath, [os.path.join(dirpath, f) for f in | ||
60 | filenames]]) | ||
61 | setup( | 8 | setup( |
62 | name='chishop', | 9 | name='chishop', |
63 | version=djangopypi.__version__, | 10 | version=djangopypi.__version__, |
11 | packages=find_packages(), | ||
64 | description='Simple PyPI server written in Django.', | 12 | description='Simple PyPI server written in Django.', |
65 | author='Ask Solem', | 13 | author='Ask Solem', |
66 | author_email='askh@opera.com', | 14 | author_email='askh@opera.com', |
67 | packages=packages, | ||
68 | url="http://ask.github.com/chishop", | 15 | url="http://ask.github.com/chishop", |
69 | zip_safe=False, | 16 | zip_safe=False, |
70 | data_files=data_files, | ||
71 | install_requires=[ | 17 | install_requires=[ |
72 | 'django>=1.0', | 18 | 'django>=1.0', |
73 | 'docutils', | 19 | 'docutils', |
74 | 'django-registration>0.7', | 20 | 'django-registration==0.8-alpha-1', |
21 | ], | ||
22 | dependency_links=[ | ||
23 | 'http://bitbucket.org/ubernostrum/django-registration/downloads', | ||
75 | ], | 24 | ], |
76 | classifiers=[ | 25 | classifiers=[ |
77 | "Development Status :: 3 - Alpha", | 26 | "Development Status :: 3 - Alpha", |