-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·101 lines (88 loc) · 2.88 KB
/
setup.py
File metadata and controls
executable file
·101 lines (88 loc) · 2.88 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#!/usr/bin/env python
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
import django_inventory
PACKAGE_NAME = 'django-inventory'
PACKAGE_DIR = 'django_inventory'
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
def fullsplit(path, result=None):
"""
Split a pathname into components (the opposite of os.path.join) in a
platform-neutral way.
"""
if result is None:
result = []
head, tail = os.path.split(path)
if head == '':
return [tail] + result
if head == path:
return result
return fullsplit(head, [tail] + result)
def find_packages(directory):
# Compile the list of packages available, because distutils doesn't have
# an easy way to do this.
packages, data_files = [], []
root_dir = os.path.dirname(__file__)
if root_dir != '':
os.chdir(root_dir)
for dirpath, dirnames, filenames in os.walk(directory):
if not dirpath.startswith('django_inventory/media'):
# Ignore dirnames that start with '.'
if os.path.basename(dirpath).startswith('.'):
continue
if '__init__.py' in filenames:
packages.append('.'.join(fullsplit(dirpath)))
elif filenames:
data_files.append([dirpath, [os.path.join(dirpath, f) for f in filenames]])
return packages
install_requires = """
Django==1.6.5
Pillow==2.5.1
South==1.0
django-compressor==1.4
django-pagination==1.0.7
django-photologue==2.3
django-solo==1.0.5
""".split()
with open('README.rst') as f:
readme = f.read()
with open('HISTORY.rst') as f:
history = f.read()
with open('LICENSE') as f:
license = f.read()
setup(
author='Roberto Rosario',
author_email='roberto.rosario.gonzalez@gmail.com',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'Intended Audience :: Information Technology',
'License :: OSI Approved :: Apache Software License',
'Natural Language :: English',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
],
description='Free Open Source Inventory and Fixed Assets Control System.',
include_package_data=True,
install_requires=install_requires,
license=license,
long_description=readme + '\n\n' + history,
name=PACKAGE_NAME,
packages=find_packages(PACKAGE_DIR),
platforms=['any'],
scripts=['django_inventory/bin/django-inventory.py'],
url='https://github.com/rosarior/django-inventory',
version=django_inventory.__version__,
zip_safe=False,
)