-
-
Notifications
You must be signed in to change notification settings - Fork 80
/
Copy pathsetup.py
executable file
·76 lines (71 loc) · 2.48 KB
/
setup.py
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
#!/usr/bin/env python
# coding: utf8
from __future__ import with_statement
from setuptools import setup, find_packages
import multiprocessing
# Figure out the version; this could be done by importing the
# module, though that requires dependencies to be already installed,
# which may not be the case when processing a pip requirements
# file, for example.
def parse_version(assignee):
import os, re
here = os.path.dirname(os.path.abspath(__file__))
version_re = re.compile(
r'%s = (\(.*?\))' % assignee)
with open(os.path.join(here, 'django_assets', '__init__.py')) as fp:
for line in fp:
match = version_re.search(line)
if match:
version = eval(match.group(1))
return ".".join(map(str, version))
else:
raise Exception("cannot find version")
version = parse_version('__version__')
webassets_version = parse_version('__webassets_version__')
setup(
name='django-assets',
version=version,
url='http://github.com/miracle2k/django-assets',
license='BSD',
author='Michael Elsdörfer',
author_email='[email protected]',
description='Asset management for Django, to compress and merge '\
'CSS and Javascript files.',
long_description=__doc__,
packages=find_packages(exclude=('tests',)),
zip_safe=False,
platforms='any',
install_requires=[
'Django>=1.7',
'webassets%s' % webassets_version
],
classifiers=[
'Environment :: Web Environment',
'Framework :: Django',
'Framework :: Django :: 1.8',
'Framework :: Django :: 1.9',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python',
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Libraries :: Python Modules'
],
test_suite='nose.collector',
tests_require=[
'nose',
],
# make plugin available to pytest
entry_points = {
'pytest11': [
'django_assets = django_assets.pytest_plugin',
]
},
)