aboutsummaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py67
1 files changed, 8 insertions, 59 deletions
diff --git a/setup.py b/setup.py
index c83c08c..cb03934 100644
--- a/setup.py
+++ b/setup.py
@@ -1,77 +1,26 @@
1#!/usr/bin/env python 1#!/usr/bin/env python
2# -*- coding: utf-8 -*- 2# -*- coding: utf-8 -*-
3import os
4import codecs
5
6try:
7 from setuptools import setup, find_packages
8except ImportError:
9 from ez_setup import use_setuptools
10 use_setuptools()
11 from setuptools import setup, find_packages
12
13from distutils.command.install_data import install_data
14from distutils.command.install import INSTALL_SCHEMES
15import sys
16
17djangopypi = __import__('djangopypi', {}, {}, [''])
18
19packages, data_files = [], []
20root_dir = os.path.dirname(__file__)
21if root_dir != '':
22 os.chdir(root_dir)
23djangopypi_dir = "djangopypi"
24
25def 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
36def 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
47for scheme in INSTALL_SCHEMES.values():
48 scheme['data'] = scheme['purelib']
49 3
4import codecs
5import djangopypi
6from setuptools import setup, find_packages
50 7
51for 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]])
61setup( 8setup(
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",