Initial commit.
This commit is contained in:
77
setup.py
Normal file
77
setup.py
Normal file
@@ -0,0 +1,77 @@
|
||||
#!/usr/bin/env python
|
||||
import os
|
||||
import posix
|
||||
import sys
|
||||
from setuptools import setup
|
||||
from setuptools import Command
|
||||
|
||||
|
||||
class MyCommand(Command):
|
||||
user_options = []
|
||||
|
||||
def initialize_options(self):
|
||||
pass
|
||||
|
||||
def finalize_options(self):
|
||||
pass
|
||||
|
||||
|
||||
class SetupPythonEnvironment(MyCommand):
|
||||
description = 'create a (virtual) python environment'
|
||||
|
||||
def run(self):
|
||||
python_bin = sys.executable if sys.executable else 'python'
|
||||
path = 'env/python'
|
||||
prompt = '(dav)'
|
||||
|
||||
print('Creating new python environment in {path}'.format(path=path))
|
||||
cmd = ('{bin} -m virtualenv'
|
||||
' --prompt="{prompt}"'
|
||||
' {path}'.format(bin=python_bin, path=path, prompt=prompt))
|
||||
os.system(cmd)
|
||||
|
||||
print('Depending on your operating system and shell,')
|
||||
print('you should enter the new environment by running')
|
||||
print('ONE of the following commands:')
|
||||
print('> source %s/bin/activate' % path)
|
||||
print('> %s/Scripts/activate.bat' % path)
|
||||
print('> %s/Scripts/activate.ps1' % path)
|
||||
|
||||
|
||||
if sys.version_info.major != 2:
|
||||
sys.stderr.write('This is not python 2. I want python 2.\n')
|
||||
sys.exit(posix.EX_USAGE)
|
||||
|
||||
|
||||
setup(
|
||||
name='django-dav-events',
|
||||
version='0.1.dev0',
|
||||
description='A django based web application project to submit DAV Events.',
|
||||
url='https://www.heinzelwelt.de',
|
||||
maintainer='Jens Kleineheismann',
|
||||
maintainer_email='heinzel@heinzelwelt.de',
|
||||
cmdclass={
|
||||
'mkpyenv': SetupPythonEnvironment,
|
||||
},
|
||||
packages=[
|
||||
'dav_events',
|
||||
'dav_events.console_scripts',
|
||||
'dav_events.migrations',
|
||||
],
|
||||
include_package_data=True,
|
||||
entry_points={
|
||||
'console_scripts': [
|
||||
'django-dav-events-admin = dav_events.console_scripts.admin:main',
|
||||
],
|
||||
},
|
||||
install_requires=[
|
||||
'babel',
|
||||
'django >= 1.11, < 2.0',
|
||||
'django-extensions',
|
||||
'django-bootstrap3',
|
||||
'django-datetime-widget',
|
||||
],
|
||||
extras_require={
|
||||
'production': ['psycopg2'],
|
||||
},
|
||||
)
|
||||
Reference in New Issue
Block a user