mirror of
https://git.wownero.com/lza_menace/wownero-python.git
synced 2024-08-15 03:25:25 +00:00
fixes #19
This commit is contained in:
parent
b14770ea5a
commit
999c5e718a
1 changed files with 22 additions and 1 deletions
23
setup.py
23
setup.py
|
@ -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',
|
||||
|
|
Loading…
Reference in a new issue