-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
63 lines (54 loc) · 1.84 KB
/
setup.py
File metadata and controls
63 lines (54 loc) · 1.84 KB
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
# -*- coding: utf-8 -*-
"""Setup module."""
import codecs
import json
from os import path
from setuptools import setup
DISTNAME = 'listmap'
VERSION_FILE = 'version.json'
MODULES = ['listmap']
SETUP_REQUIRES = []
INSTALL_REQUIRES = []
EXTRAS_REQUIRES = {'test': ['pytest']}
def get_version(source):
""" Retrieve version number."""
with open(source, 'r') as fp:
version_data = json.load(fp)
try:
return version_data['version']
except KeyError:
# no version number in version.json
raise KeyError('check version file: no version number')
def get_long_description(here):
"""Get the long description from the README file."""
with codecs.open(path.join(here, 'README.rst'), encoding='utf-8') as _rf:
return _rf.read()
HERE = path.abspath(path.dirname(__file__))
VERSION = get_version(path.join(HERE, VERSION_FILE))
LONG_DESCRIPTION = get_long_description(HERE)
setup(
name=DISTNAME,
version=VERSION,
description='A template project with packages',
long_description=LONG_DESCRIPTION,
author='Simone Marsili',
author_email='simo.marsili@gmail.com',
url='https://github.com/simomarsili/' + DISTNAME,
py_modules=MODULES,
# packages=find_packages(exclude=['tests']),
package_data={'': ['LICENSE.txt', 'README.rst', 'requirements.txt']},
include_package_data=True,
setup_requires=SETUP_REQUIRES,
install_requires=INSTALL_REQUIRES,
extras_require=EXTRAS_REQUIRES,
license='BSD 3-Clause',
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
'Development Status :: 3 - Alpha',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
],
)