server/python/django/setup.py
author rougeronj
Tue, 05 May 2015 17:59:14 +0200
changeset 445 705a2e9c6c9d
parent 338 34c339f32aeb
permissions -rw-r--r--
Add popup_editor and editor_panel option to allow the editor panel to bin in an external div Update the scene, the node editor and the edge editor to include the options

import os
import sys

from setuptools import setup, find_packages

# Dynamically calculate the version based on django.VERSION.
version = __import__('renkanmanager').get_version()

def launch_setup(script_name, script_args):


    data_files = []
    
    root_dir = os.path.dirname(__file__)
    if root_dir != '':
        os.chdir(root_dir)
    source_dir = 'renkanmanager'

    
    for dirpath, dirnames, filenames in os.walk(source_dir):
        # Ignore dirnames that start with '.'
        for i, dirname in enumerate(dirnames):
            if dirname.startswith('.'): del dirnames[i]
        if filenames and '__init__.py' not in filenames:
            data_files.append([dirpath, [os.path.join(dirpath, f) for f in filenames]])

    #write MANIFEST.in
    
    with open("MANIFEST.in", "w") as m:
        m.write("include MANIFEST.in\n")
        for entry in data_files:
            file_list = entry[1]
            for filename in file_list:
                m.write("include %s\n" % (filename))

    setup(
        script_name = script_name,
        script_args = script_args,
        name='renkanmanager',
        version=version,
        url='http://renkan.iri-research.org/',
        author='I.R.I.',
        author_email='contact@iri-research.org',
        description=('Basic Django module for saving renkan'),
        license='CECILL-B',
        packages=find_packages(),
        include_package_data=True,
        zip_safe=False,
        classifiers=[
            'Development Status :: 3 - Alpha',
            'Environment :: Web Environment',
            'Framework :: Django',
            'Intended Audience :: Developers',
            'License :: OSI Approved :: CECILL License',
            'Operating System :: OS Independent',
            'Programming Language :: Python',
            'Programming Language :: Python :: 2',
            'Programming Language :: Python :: 2.7',
            'Topic :: Internet :: WWW/HTTP',
            'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
            'Topic :: Internet :: WWW/HTTP :: WSGI',
            'Topic :: Software Development :: Libraries :: Python Modules',
        ],
    )
    
if __name__ == "__main__":
    
    script_name = os.path.basename(sys.argv[0])
    script_args = sys.argv[1:]
    
    launch_setup(script_name, script_args)