forked from UWPCE-PythonCert/ProgrammingInPython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·36 lines (27 loc) · 874 Bytes
/
Copy pathsetup.py
File metadata and controls
executable file
·36 lines (27 loc) · 874 Bytes
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
#!/usr/bin/env python
"""
This is about as simple a setup.py as you can have
But its enough to support the json_save package
"""
import os
from setuptools import setup, find_packages
def get_version():
"""
Reads the version string from the package __init__ and returns it
"""
with open(os.path.join("json_save", "__init__.py")) as init_file:
for line in init_file:
parts = line.strip().partition("=")
if parts[0].strip() == "__version__":
return parts[2].strip().strip("'").strip('"')
return None
setup(
name='json_save',
version=get_version(),
author='Chris Barker',
author_email='PythonCHB@gmail.com',
packages=find_packages(),
# license='LICENSE.txt',
description='Metaclass based system for saving object to JSON',
long_description=open('README.txt').read(),
)