-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.py
69 lines (61 loc) · 2.08 KB
/
setup.py
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
64
65
66
67
68
69
# -*- coding: utf-8 -*-
from os import path
from setuptools import setup
# from setuptools import find_packages
NAME = 'pcdhit'
MODULES = [
'pcdhit',
]
PACKAGES = []
VERSION_FILE = 'version.json'
SETUP_REQUIRES = []
INSTALL_REQUIRES = [
# # this is an example of URL based requirement (see PEP508):
# 'package @ http://github.com/user/repo/archive/master.tar.gz',
'little-bio-parser @ http://github.com/simomarsili/little-bio-parser/'
'archive/master.tar.gz']
EXTRAS_REQUIRES = {'test': ['pytest']}
def get_version(source):
""" Retrieve version number."""
import json
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."""
import codecs
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=NAME,
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/' + NAME,
py_modules=MODULES,
packages=PACKAGES,
# 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.5',
'Programming Language :: Python :: 3.6',
],
)