Kaydet (Commit) 211302f4 authored tarafından Berker Peksag's avatar Berker Peksag

Add setuputils.

üst d65ae3fe
*.egg-info
build/
dist/
bad.txt
test_codegen_dump_1.txt
test_codegen_dump_2.txt
......@@ -2,22 +2,20 @@
from setuptools import setup
from setuputils import find_version, read
def readdoc():
with open('README.rst') as fobj:
data = fobj.read()
return data
setup(
name='astor',
version='0.2.2',
version=find_version('astor/__init__.py'),
description='Read/rewrite/write Python ASTs',
long_description=readdoc(),
long_description=read('README.rst'),
author='Patrick Maupin',
author_email='pmaupin@gmail.com',
platforms="Independent",
url='https://github.com/pmaupin/astor.git',
packages=['astor'],
py_modules=['setuputils'],
license="BSD",
classifiers=[
'Development Status :: 3 - Alpha',
......
import codecs
import os.path
import re
def read(*parts):
file_path = os.path.join(os.path.dirname(__file__), *parts)
return codecs.open(file_path).read()
def find_version(*parts):
version_file = read(*parts)
version_match = re.search(r'^__version__ = [\'"]([^\'"]*)[\'"]',
version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError('Unable to find version string.')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment