-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathsetup.py
More file actions
118 lines (106 loc) · 4.89 KB
/
setup.py
File metadata and controls
118 lines (106 loc) · 4.89 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
#!/usr/bin/env python
''' The PUG namespace package (meta package) depends on all the pug-* packages
collection. As a result, installing it vith `pip` or `easy_install` also installs:
+ pug-nlp Natural Language and Text-Processing utilities
+ pug-ann Artificial Neural Network utilities for the pybrain package
+ pug-djdb Django utilities and webapps for crawling and mining for data
+ pug-invest Utilities for predictivie analytics on time series data (including financial data)
- pug-bin Dev-Ops scripts (some shell/bash, but mostly python)
'''
# from setuptools import find_packages
from setuptools import setup
import os
# setup.py for PUG (PDX Python User Group) package
# the parent name (perhaps a namespace package) you'd import
__namespace_package__ = 'pug'
# the subpackage that this installer is providing that you'd import like
# __import__(__namespace_package__ + '.' + '__subpackage__')
__subpackage__ = ''
# The name as it will appear in the pypi cheeseshop repositor, not the name
# you'd use to import it
project_name = '{}'.format(__namespace_package__) + ('-' + __subpackage__ if __subpackage__ else '')
# the full import name
package_name = '{}'.format(__namespace_package__) + ('.' + __subpackage__ if __subpackage__ else '')
# # If you want tests to work with django settings.py you need django-setuptest
# from setuptest import test
# # If you want to use setuptest.test instead of the python test,
# # you need to say so in your setup(kwargs) below, like this:
# # setup(cmdclass={'test': test},...
print('Installing package named {} from the {} project, a sub-package/project of the namespace package {}. . .'.format(
package_name, project_name, package_name))
global_env, env = {}, {}
package_info_path = os.path.join(__subpackage__, 'package_info.py')
if __namespace_package__:
package_info_path = os.path.join(__namespace_package__, package_info_path)
# FIXME: import this by path instead of executing it
execfile(package_info_path, global_env, env)
print('Found package info in {}: {}'.format(package_info_path, env))
version = env.get('__version__', '0.0.1')
package_docstring = env.get('__doc__', '`{}` python package'.format(project_name))
description = package_docstring.split('\n')[0]
long_description = package_docstring
__url__ = env.get('__url__', 'http://github.com/hobson/')
__authors__ = env.get('__authors__', ('Hobson <hobson@totalgood.com>',))
try:
long_description = open('README.rst', 'r').read()
except: # (IOError, ImportError, OSError, RuntimeError):
print('WARNING: Unable to find or read README.rst.')
print('Installing package named {} pointed at url {}. . .'.format(project_name, __url__))
dependency_links = [
'http://github.com/hobson/pybrain/tarball/master#egg=pybrain-0.3.3',
]
EXCLUDE_FROM_PACKAGES = []
print('Installing package named {} from the {} project. . .'.format(package_name, project_name))
from setuptools import find_packages
packages = list(set([package_name] + list(find_packages(exclude=EXCLUDE_FROM_PACKAGES))))
print('Packages being installed: {}'.format(packages))
# sudo yum install libjpeg-devel openjpeg-devel
install_requires = [
'nlup>=0.5',
'pug-nlp>=0.0.21',
'pug-ann>=0.0.22',
'pug-invest>=0.0.18',
'pug-dj>=0.0.18',
]
print('install_requires: {}'.format(install_requires))
setup(
name=project_name,
version=version,
# url = __url__,
description='Meta package to install the PDX Python User Group utilities.',
long_description=long_description,
author='Hobson Lane',
author_email='admin@totalgood.com',
include_package_data=True, # install non-.py files listed in MANIFEST.in (.js, .html, .txt, .md, etc)
license='MIT',
platforms='',
# enable the command-line script `push.py 'message'`
scripts=[
'pug/bin/push.sh',
'pug/bin/register.sh',
'pug/bin/install_requirements',
'pug/bin/push.py',
],
# # enable the command-line script `push 'message'`
# entry_points={'console_scripts': [
# 'push=pug.bin.push:main',
# ]},
dependency_links=dependency_links,
install_requires=install_requires,
keywords=["natural language processing", "text processing", "neural net", "science",
"data science", "math", "machine-learning", "statistics", "database"],
classifiers=[
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Development Status :: 2 - Pre-Alpha",
"Environment :: Other Environment",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Internet :: WWW/HTTP :: Indexing/Search",
],
)