Skip to content

Commit

Permalink
add setup.py, publish to pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
reorx committed Sep 1, 2016
1 parent e247dcb commit 21c52f3
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/usr/bin/env python
# coding=utf-8

from setuptools import setup


package_name = 'httpstat'
filename = package_name + '.py'


def get_version():
import ast

with open(filename) as input_file:
for line in input_file:
if line.startswith('__version__'):
return ast.parse(line).body[0].value.s


def get_long_description():
try:
with open('README.md', 'r') as f:
return f.read()
except IOError:
return ''


setup(
name=package_name,
version=get_version(),
author='reorx',
author_email='novoreorx@gmail.com',
description='curl statistics made simple',
url='https://github.com/reorx/httpstat',
long_description=get_long_description(),
py_modules=[package_name],
entry_points={
'console_scripts': [
'httpstat = httpstat:main'
]
},
license='License :: OSI Approved :: MIT License',
)

0 comments on commit 21c52f3

Please sign in to comment.