-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.py
52 lines (42 loc) · 1.47 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
"""
Source build and installation script.
"""
from os import path, sep, walk
from pip.download import PipSession
from pip.req import parse_requirements
from setuptools import setup, find_packages
def extract_requirements(filename):
return [str(r.req) for r in parse_requirements(filename, session=PipSession)]
def find_package_data(source, strip=''):
pkg_data = []
for root, dirs, files in walk(source):
pkg_data += map(
lambda f: path.join(root.replace(strip, '').lstrip(sep), f),
files
)
return pkg_data
base_dir = path.dirname(__file__)
with open(path.join(base_dir, 'README.rst')) as f:
long_description = f.read()
install_requires = extract_requirements('requirements.txt')
setup(
name='python-cafe-sqlalchemy',
version='0.5.0-dev',
description='Handy SQLAlchemy bits and bobs, as an extension for Cafe',
long_description=long_description,
license='APLv2',
url='https://github.com/betsybookwyrm/python-cafe-sqlalchemy',
author='Elizabeth Alpert',
author_email='[email protected]',
classifiers=[
'Topic :: Software Development :: Libraries :: Python Modules',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python',
],
packages=find_packages(),
include_package_data=True,
package_data={},
install_requires=install_requires,
)