This commit is contained in:
Maciej Urbanski 2018-06-06 11:14:00 +02:00
parent b14770ea5a
commit 999c5e718a
No known key found for this signature in database
GPG key ID: 9A1A800C0AD21A36

View file

@ -1,8 +1,29 @@
# -*- coding: utf-8 -*-
import codecs
import os
import re
from distutils.core import setup
from setuptools import find_packages
version = __import__('monero').__version__
here = os.path.abspath(os.path.dirname(__file__))
def find_version(*parts):
"""
Figure out version number without importing the package.
https://packaging.python.org/guides/single-sourcing-package-version/
"""
with codecs.open(os.path.join(here, *parts), 'r', errors='ignore') as fp:
version_file = fp.read()
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.")
version = find_version('monero', '__init__.py')
setup(
name = 'monero-python',