Skip to content

Commit

Permalink
merged develop
Browse files Browse the repository at this point in the history
  • Loading branch information
mgalofre committed Mar 6, 2017
1 parent 3d6b8bc commit cfb3005
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# -*- encoding: utf-8 -*-

# import os
# import re
# import codecs
import os
import re
import codecs

try:
from setuptools import setup, find_packages
Expand All @@ -14,27 +14,24 @@ def get_version(package):
"""
Return package version as listed in `__version__` in `init.py`.
"""
return "0.1"
# init_py = codecs.open(os.path.abspath(os.path.join(package, '__init__.py')), encoding='utf-8').read()
# return re.search("^__version__ = ['\"]([^'\"]+)['\"]", init_py, re.MULTILINE).group(1)
init_py = codecs.open(os.path.abspath(os.path.join(package, '__init__.py')), encoding='utf-8').read()
return re.search("^__version__ = ['\"]([^'\"]+)['\"]", init_py, re.MULTILINE).group(1)


def get_author(package):
"""
Return package author as listed in `__author__` in `init.py`.
"""
return "Marc Galofré"
# init_py = codecs.open(os.path.abspath(os.path.join(package, '__init__.py')), encoding='utf-8').read()
# return re.search("^__author__ = ['\"]([^'\"]+)['\"]", init_py, re.MULTILINE).group(1)
init_py = codecs.open(os.path.abspath(os.path.join(package, '__init__.py')), encoding='utf-8').read()
return re.search("^__author__ = ['\"]([^'\"]+)['\"]", init_py, re.MULTILINE).group(1)


def get_email(package):
"""
Return package email as listed in `__email__` in `init.py`.
"""
return "[email protected]"
# init_py = codecs.open(os.path.abspath(os.path.join(package, '__init__.py')), encoding='utf-8').read()
# return re.search("^__email__ = ['\"]([^'\"]+)['\"]", init_py, re.MULTILINE).group(1)
init_py = codecs.open(os.path.abspath(os.path.join(package, '__init__.py')), encoding='utf-8').read()
return re.search("^__email__ = ['\"]([^'\"]+)['\"]", init_py, re.MULTILINE).group(1)


setup(
Expand All @@ -44,8 +41,7 @@ def get_email(package):
include_package_data=True,
keywords="addonpayments sdk python hpp api",
description='A SDK Addonpayments implemented with Python.',
# long_description=codecs.open(os.path.join(os.path.dirname(__file__), 'README.rst'), encoding='utf-8').read(),
long_description='',
long_description=codecs.open(os.path.join(os.path.dirname(__file__), 'README.rst'), encoding='utf-8').read(),
install_requires=[
'python-decouple',
'attrs',
Expand Down

0 comments on commit cfb3005

Please sign in to comment.