| author | ymh <ymh.work@gmail.com> |
| Tue, 30 Apr 2013 17:15:30 +0200 | |
| branch | socialauth |
| changeset 1172 | 7a8c942972b5 |
| parent 13 | 97ab7b3191cf |
| child 30 | 83f4abc7568f |
| permissions | -rw-r--r-- |
| 0 | 1 |
import os |
2 |
from setuptools import setup, find_packages |
|
3 |
||
4 |
ROOT_DIR = os.path.dirname(__file__) |
|
| 3 | 5 |
SOURCE_DIR = os.path.join(ROOT_DIR, 'ldt') |
| 0 | 6 |
|
7 |
version = __import__('ldt').__version__ |
|
8 |
||
| 3 | 9 |
def fullsplit(path, result=None): |
10 |
""" |
|
11 |
Split a pathname into components (the opposite of os.path.join) in a |
|
12 |
platform-neutral way. |
|
13 |
""" |
|
14 |
if result is None: |
|
15 |
result = [] |
|
16 |
head, tail = os.path.split(path) |
|
17 |
if head == '': |
|
18 |
return [tail] + result |
|
19 |
if head == path: |
|
20 |
return result |
|
21 |
return fullsplit(head, [tail] + result) |
|
22 |
||
| 2 | 23 |
packages, data_files = [], [] |
24 |
||
| 3 | 25 |
for dirpath, dirnames, filenames in os.walk(SOURCE_DIR): |
| 2 | 26 |
# Ignore dirnames that start with '.' |
27 |
for i, dirname in enumerate(dirnames): |
|
28 |
if dirname.startswith('.'): del dirnames[i] |
|
29 |
if '__init__.py' in filenames: |
|
30 |
packages.append('.'.join(fullsplit(dirpath))) |
|
31 |
elif filenames: |
|
32 |
data_files.append([dirpath, [os.path.join(dirpath, f) for f in filenames]]) |
|
33 |
||
| 0 | 34 |
setup( |
|
13
97ab7b3191cf
add api to update project, uses psiton
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
35 |
name='Ldt', |
|
97ab7b3191cf
add api to update project, uses psiton
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
36 |
version=version, |
|
97ab7b3191cf
add api to update project, uses psiton
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
37 |
author='Yves-Marie Haussonne (IRI)', |
|
97ab7b3191cf
add api to update project, uses psiton
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
38 |
author_email='contact@iri.centrepompidou.fr', |
|
97ab7b3191cf
add api to update project, uses psiton
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
39 |
packages=packages, |
|
97ab7b3191cf
add api to update project, uses psiton
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
40 |
data_files=data_files, |
| 2 | 41 |
# package_data = { |
42 |
# '': [ |
|
43 |
# 'media/*', |
|
44 |
# 'locale/*/LC_MESSAGES/*', |
|
45 |
# 'templates/ldt/*.html', |
|
46 |
# 'templates/admin/*.html', |
|
47 |
# 'templates/cms/admin/cms/page/*.html', |
|
48 |
# ] |
|
49 |
# }, |
|
|
13
97ab7b3191cf
add api to update project, uses psiton
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
50 |
scripts=[], |
|
97ab7b3191cf
add api to update project, uses psiton
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
51 |
url='https://www.iri.centrepompidou.fr/dev/hg/platform', |
|
97ab7b3191cf
add api to update project, uses psiton
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
52 |
license='LICENSE.txt', |
|
97ab7b3191cf
add api to update project, uses psiton
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
53 |
description='Platform ldt', |
|
97ab7b3191cf
add api to update project, uses psiton
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
54 |
long_description=open('README.txt').read(), |
|
97ab7b3191cf
add api to update project, uses psiton
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
55 |
zip_safe=False, |
|
97ab7b3191cf
add api to update project, uses psiton
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
56 |
classifiers=['Development Status :: 5 - Production/Stable', |
| 0 | 57 |
'Environment :: Web Environment', |
58 |
'Framework :: Django', |
|
59 |
'Intended Audience :: Developers', |
|
60 |
'License :: Ceccil-C', |
|
61 |
'Operating System :: OS Independent', |
|
62 |
'Programming Language :: Python', |
|
63 |
'Topic :: Utilities'], |
|
64 |
) |