Luke Murphy 5 years ago
parent
commit
73ac351bdd
No known key found for this signature in database GPG Key ID: 5E2EF5A63E3718CC
  1. 4
      bin/etherpump
  2. 3
      etherpump/__init__.py
  3. 24
      setup.py

4
bin/etherpump

@ -2,7 +2,7 @@
import sys
from etherpump import VERSION
from etherpump import __VERSION__
usage = """Usage:
etherpump CMD
@ -36,7 +36,7 @@ try:
print(usage)
sys.exit(0)
elif any(arg in args for arg in ['--version', '-v']):
print('etherpump {}'.format(VERSION))
print('etherpump {}'.format(__VERSION__))
sys.exit(0)
except IndexError:

3
etherpump/__init__.py

@ -1,4 +1,5 @@
import os
DATAPATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), "data")
VERSION = '0.0.2'
__VERSION__ = '0.0.2'

24
setup.py

@ -1,15 +1,35 @@
#!/usr/bin/env python3
import codecs
import os
import re
from setuptools import find_packages, setup
from etherpump import VERSION
def read(*parts):
current_file = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(current_file, *parts), 'r') as fp:
return fp.read()
def find_version(*file_paths):
version_file = read(*file_paths)
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.")
with open('README.md', 'r') as handle:
long_description = handle.read()
setup(
name='etherpump',
version=VERSION,
version=find_version('etherpump', '__init__.py'),
author='Varia members',
author_email='info@varia.zone',
packages=find_packages(),

Loading…
Cancel
Save