This repository was archived by the owner on Nov 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathsetup.py
More file actions
54 lines (44 loc) · 1.71 KB
/
setup.py
File metadata and controls
54 lines (44 loc) · 1.71 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from setuptools import setup, find_packages
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
BASE_DIR = os.path.join(os.path.dirname(__file__))
with open(os.path.join(BASE_DIR, 'requirements.txt')) as f:
REQUIREMENTS = f.read()
URL = 'https://github.com/nitely/python-react-v8'
README = "For more info, go to: {}".format(URL)
def get_version(package):
"""Get version without importing the lib"""
with open(os.path.join(BASE_DIR, package, '__init__.py')) as fh:
return [
l.split('=', 1)[1].strip().strip("'")
for l in fh.readlines()
if '__version__' in l][0]
setup(
name='python-react-v8',
version=get_version(package='react'),
description='Thin wrapper around v8-cffi to render React views server-side.',
author='Esteban Castro Borsani',
author_email='ecastroborsani@gmail.com',
long_description=README,
url=URL,
packages=find_packages(exclude=['examples']),
test_suite="runtests.start",
zip_safe=False,
include_package_data=True,
install_requires=REQUIREMENTS,
setup_requires=REQUIREMENTS,
license='MIT License',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content'])