Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 87 lines (75 sloc) 2.733 kb
23d68f3 @facconi Distutils configuration
facconi authored
1 #!/usr/bin/env python
cbb61da @facconi Updated the package name
facconi authored
2 PACKAGE_NAME = 'cmsplugin_vimeo'
23d68f3 @facconi Distutils configuration
facconi authored
3 PACKAGE_DIR = PACKAGE_NAME
4
5 import os, sys
6
aaaeabb @facconi Distutils configuration
facconi authored
7 from distutils.core import setup
23d68f3 @facconi Distutils configuration
facconi authored
8 from distutils.command.install import INSTALL_SCHEMES
9
10 def fullsplit(path, result=None):
11 """
12 Split a pathname into compontents (the opposite of os.path.join) in a
13 platform-neutral way.
14 """
15 if result is None:
16 result = []
17 head, tail = os.path.split(path)
18 if head == '':
19 return [tail] + result
20 if head == path:
21 return result
22 return fullsplit(head, [tail] + result)
23
24 # Tell disutils to put the data_files in platofmr-specific installation
25 # locations.
26 for scheme in INSTALL_SCHEMES.values():
27 scheme['data'] = scheme['purelib']
28
29 # Compile the list of packages available, because distuils doesn't have
30 # and easy way to do this.
31 packages, data_files = [], []
32 root_dir = os.path.dirname(__file__)
33 if root_dir != '':
34 os.chdir(root_dir)
35
36 for dirpath, dirnames, filenames in os.walk(PACKAGE_DIR):
37 # Ignore dirnames that start with '.'
38 for i, dirname in enumerate(dirnames):
39 if dirname.startswith('.'): del dirnames[i]
40 if '__init__.py' in filenames:
41 packages.append('.'.join(fullsplit(dirpath)))
42 elif filenames:
43 data_files.append(
44 [dirpath, [os.path.join(dirpath, f) for f in filenames]]
45 )
46 # Small hack for working with bdist_wininst
47 # See http://mail.python.org/pipermail/distutils-sig/2004-August/004134.html
48 if len(sys.argv) > 1 and sys.argv[1] == 'bdist_wininst':
49 for file_info in data_files:
50 file_info[0] = '\\PURELIB\\%s' % file_info[0]
51
52 # Dynamically calculate the version based on package.VERSION
53 version = __import__(PACKAGE_NAME).get_version()
aaaeabb @facconi Distutils configuration
facconi authored
54
55 setup(
56 name='cmsplugin_vimeo',
23d68f3 @facconi Distutils configuration
facconi authored
57 version=version.replace(' ', '-'),
58 packages=packages,
59 data_files=data_files,
aaaeabb @facconi Distutils configuration
facconi authored
60 url='https://github.com/Immediatic/cmsplugin_vimeo',
61 license='LICENSE.txt',
62 author='Francesco Facconi',
63 author_email='francesco@immediatic.it',
23d68f3 @facconi Distutils configuration
facconi authored
64 description='Plugin for Django CMS that makes easy to embed Vimeo movies.',
65 install_requires=[
66 "Django >= 1.4",
67 "django-cms >= 2.3",
68 ],
69 classifiers=[
70 'Development Status :: 5 - Production/Stable',
71 'Environment :: Plugins',
72 'Environment :: Web Environment',
73 'Framework :: Django',
74 'Intended Audience :: Developers',
75 'License :: OSI Approved :: BSD License',
76 'Natural Language :: English',
77 'Operating System :: OS Independent',
78 'Programming Language :: Python :: 2',
79 'Topic :: Multimedia :: Video :: Display',
80 'Topic :: Software Development :: Libraries :: Python Modules',
81 'Topic :: Utilities',
82 ]
aaaeabb @facconi Distutils configuration
facconi authored
83 )
23d68f3 @facconi Distutils configuration
facconi authored
84
85
86
Something went wrong with that request. Please try again.