Subversion Repositories MeX

Rev

Rev 1 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
# File: setup.py
# Author: Tomás Vírseda
# License: GPL v3
# Description: setup.py tells you that the module/package you are about
# to install has been packaged and distributed with Distutils, which is
# the standard for distributing Python Modules.
"""


import os
from os.path import sep as SEP
import sys
import subprocess
from setuptools import setup

if sys.platform == 'win32':
    import os.path
    HOME = os.path.expanduser('~')
else:
    HOME = os.environ['HOME']

HOME_DESKTOP_DIR = HOME + SEP + '.local' + SEP + 'share' + SEP + 'applications'
HOME_ICONS_DIR = HOME + SEP + '.local' + SEP + 'share' + SEP + 'icons'


with open('README') as f:
    long_description = f.read()


def add_data_mex():
    try:
        data_files_mex = [
            ('mex/data/share', []),
            ('mex/data/share/docs',
                    [
                    'AUTHORS',
                    'LICENSE',
                    'README',
                    'INSTALL',
                    'CREDITS',
                    'Changelog'
                    ]),
            ('mex/data/plugins',
                [
                    'mex/data/plugins/simpleplugin.yapsy-plugin',
                    'mex/data/plugins/SimplePlugin.py',
                    'mex/data/plugins/coremetadataplugin.yapsy-plugin',
                    'mex/data/plugins/CoreMetadataPlugin.py',
                ]),
            ]
        return data_files_mex
    except:
        return []

data_files = []
data_files += add_data_mex()


def main():
    setup(
        name='MeX',
        version='0.1',
        author='Tomás Vírseda',
        author_email='tomasvirseda@gmail.com',
        url='http://subversion.t00mlabs.net/mex',
        description='Metadata eXplorer',
        long_description=long_description,
        download_url = 'http://t00mlabs.net/downloads/mex-0.1.tar.gz',
        license='GPLv3',
        packages=['mex', 'mex.core', 'mex.services'],
        # distutils does not support install_requires, but pip needs it to be
        # able to automatically install dependencies
        install_requires=[
              'yapsy',
        ],
        include_package_data=True,
        data_files=data_files,
        zip_safe=False,
        platforms='any',
        classifiers=[
            'Development Status :: 3 - Alpha',
            'Intended Audience :: Information Technology',
            'Intended Audience :: Other Audience',
            'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
            'Natural Language :: English',
            'Operating System :: Microsoft :: Windows',
            'Operating System :: POSIX :: Linux',
            'Programming Language :: Python :: 3',
            'Topic :: Utilities'
        ],
        entry_points={
            'gui_scripts': [
                'mex = mex.mex:main',
                ]
            },
    )


if __name__ == '__main__':
    main()