-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
48 lines (39 loc) · 1.3 KB
/
setup.py
File metadata and controls
48 lines (39 loc) · 1.3 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
#!/usr/bin/python3 -S
import os
import uuid
from setuptools import setup
from pip.req import parse_requirements
from pkgutil import walk_packages
PKG = 'cargo'
PKG_NAME = 'cargo-orm'
PKG_VERSION = '0.1.1'
pathname = os.path.dirname(os.path.realpath(__file__))
# parse_requirements() returns generator of pip.req.InstallRequirement objects
install_reqs = parse_requirements(pathname + "/requirements.txt",
session=uuid.uuid1())
def find_packages(prefix=""):
path = [prefix]
yield prefix
prefix = prefix + "."
for _, name, ispkg in walk_packages(path, prefix):
if ispkg:
yield name
setup(
name=PKG_NAME,
version=PKG_VERSION,
description='A friendly, rich Postgres ORM for Python 3.5+.',
author='Jared Lunde',
author_email='jared@tessellate.io',
url='https://github.com/jaredlunde/cargo-orm',
license="MIT",
classifiers=[
"Development Status :: 4 - Beta",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Database :: Front-Ends",
"Operating System :: OS Independent"
],
install_requires=[str(ir.req) for ir in install_reqs],
packages=list(find_packages(PKG))
)