Skip to content

Commit d00edac

Browse files
author
2captcha
authored
Merge pull request #28 from nathanielobrown/master
Removes setup.py dependency on package
2 parents 661d46d + b3c28e3 commit d00edac

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

setup.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
#!/usr/bin/env python3
22

33
from setuptools import setup, find_packages
4-
from twocaptcha import __version__
4+
import re
55

66
with open("README.md", "r") as fh:
77
long_description = fh.read()
88

9+
10+
def get_version():
11+
with open('twocaptcha/__init__.py', 'r') as f:
12+
return re.search(r'__version__ = ["\'](.*?)["\']', f.read()).group(1)
13+
14+
915
setup(name='2captcha-python',
10-
version=__version__,
16+
version=get_version(),
1117
description='Python module for easy integration with 2Captcha API',
1218
long_description=long_description,
1319
long_description_content_type="text/markdown",

0 commit comments

Comments
 (0)