aboutsummaryrefslogtreecommitdiff
path: root/setup.py
blob: 626484ec486cf36a61ee5bf7b0a68e7587764b03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import os
import codecs
import djangopypi
from setuptools import setup, find_packages
from distutils.core import Command
from subprocess import call


class devserver(Command):
    """
    Convenience command to sync the database and run a
    development server.

    $ python setup.py runserver
    """

    description = "run the django development server"

    # Must be overridden even though we don't need them
    user_options = []
    initialize_options = finalize_options = lambda self: None

    def run(self):
        environ = os.environ.copy()
        environ['DJANGO_SETTINGS_MODULE'] = 'chishop.settings'

        call(['django-admin.py', 'syncdb'], env=environ)
        call(['django-admin.py', 'runserver'], env=environ)


setup(
    name='chishop',
    version=djangopypi.__version__,
    packages=find_packages(),
    description='Simple PyPI server written in Django.',
    author='Ask Solem',
    author_email='askh@opera.com',
    url="http://ask.github.com/chishop",
    install_requires=[
        'django>=1.0',
        'docutils',
        'django-registration==0.8-alpha-1',
    ],
    dependency_links=[
        'http://bitbucket.org/ubernostrum/django-registration/downloads',
    ],
    cmdclass={
        'devserver': devserver,
    },
    classifiers=[
        "Development Status :: 3 - Alpha",
        "Environment :: Web Environment",
        "Framework :: Django",
        "Operating System :: OS Independent",
        "Intended Audience :: Developers",
        "Intended Audience :: System Administrators",
        "License :: OSI Approved :: BSD License",
        "Topic :: System :: Software Distribution",
        "Programming Language :: Python",
    ],
    long_description=codecs.open('README', "r", "utf-8").read(),
)