forked from specialunderwear/setupreader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
75 lines (69 loc) · 1.89 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
70
71
72
73
74
75
"""
setup.py contains a function named setup.
When writing software that works with python packages it is very
inconvenient to retrieve the package metadata from setup.py. This package
makes it easy, just point it at setup.py and get a dict.
>>> import setupreader, json
>>> foo = setupreader.load('setup.py')
>>> print json.dumps(foo, indent=4)
{
"description": "retrieve package specification from setup,py",
"install_requires": [
"setuptools",
"mock"
],
"zip_safe": false,
"keywords": "",
"packages": [],
"classifiers": [],
"entry_points": {
"console_scripts": [
"read-setup = setupreader:main"
]
},
"name": "setupreader",
"license": "",
"author": "Lars van de Kerkhof",
"url": "",
"include_package_data": true,
"py_modules": [
"setupreader"
],
"long_description": "",
"author_email": "[email protected]",
"version": "0.0.1"
}
"""
from setuptools import setup, find_packages
__version__ = "0.0.3"
setup(
# package name in pypi
name='setupreader',
# extract version from module.
version=__version__,
description="retrieve package specification from setup.py",
long_description=__doc__,
classifiers=[],
keywords='',
author='Lars van de Kerkhof',
author_email='[email protected]',
url='https://github.com/specialunderwear/setupreader',
license='GPL',
# include all packages in the egg, except the test package.
packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
py_modules=['setupreader'],
# include non python files
include_package_data=True,
zip_safe=False,
# specify dependencies
install_requires=[
'setuptools',
'mock'
],
# generate scripts
entry_points={
'console_scripts':[
'setupreader = setupreader:main',
]
}
)