forked from joshburnett/scanf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·47 lines (38 loc) · 1.34 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import re
from setuptools import setup
with open('README.md') as readme:
scanf_long_description = readme.read()
def get_version(filename='scanf.py'):
""" Extract version information from source code """
version = ''
with open(filename, 'r') as fp:
for line in fp:
m = re.search('__version__ .* ''(.*)''', line)
if m is not None:
version = (m.group(1)).strip('\'')
break
return version
setup(
name = "scanf",
version = get_version(),
py_modules=["scanf"],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
],
# metadata for upload to PyPI
author = "Josh Burnett",
author_email = "[email protected]",
description = "A small scanf implementation",
long_description=scanf_long_description,
long_description_content_type="text/markdown",
license = "MIT",
keywords = "scanf",
install_requires=['backports.functools_lru_cache;python_version<"2.9"'],
platform = "any",
url = "https://github.com/joshburnett/scanf",
)