1+ import setuptools
2+ import os
3+ import re
4+ import sys
5+
6+ with open ("README.md" , "r" ) as fh :
7+ long_description = fh .read ()
8+
9+ def get_version ():
10+ """Get current version from code."""
11+ regex = r"__version__\s=\s\"(?P<version>[\d\.]+?)\""
12+ path = ("geocachingapi" , "__version__.py" )
13+ return re .search (regex , read (* path )).group ("version" )
14+
15+ def read (* parts ):
16+ """Read file."""
17+ filename = os .path .join (os .path .abspath (os .path .dirname (__file__ )), * parts )
18+ sys .stdout .write (filename )
19+ with open (filename , encoding = "utf-8" , mode = "rt" ) as fp :
20+ return fp .read ()
21+
22+ setuptools .setup (
23+ name = "geocachingapi" ,
24+ version = get_version (),
25+ author = "Rudolf Offereins" ,
26+ author_email = "r.offereins@gmail.com" ,
27+ description = "Python client for controlling the Geocaching API" ,
28+ long_description = long_description ,
29+ long_description_content_type = "text/markdown" ,
30+ url = "https://github.com/Sholofly/geocachingapi-python" ,
31+ packages = setuptools .find_packages (include = ["geocachingapi" ]),
32+ license = "MIT license" ,
33+ install_requires = [],
34+ keywords = ["geocaching" , "api" ],
35+ classifiers = [
36+ "Development Status :: 3 - Alpha" ,
37+ "Programming Language :: Python :: 3" ,
38+ "License :: OSI Approved :: MIT License" ,
39+ "Operating System :: OS Independent" ,
40+ "Natural Language :: English" ,
41+ "Intended Audience :: Developers" ,
42+ "Programming Language :: Python :: 3.6" ,
43+ "Programming Language :: Python :: 3.7" ,
44+ "Programming Language :: Python :: 3" ,
45+ "Topic :: Software Development :: Libraries :: Python Modules" ,
46+ ],
47+ python_requires = '>=3.6' ,
48+ zip_safe = False ,
49+ include_package_data = True ,
50+ )
0 commit comments