-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
39 lines (35 loc) · 1.23 KB
/
setup.py
File metadata and controls
39 lines (35 loc) · 1.23 KB
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
import re
from os import path
from setuptools import setup
VERSIONFILE = "initpkg/__init__.py"
with open(VERSIONFILE, "rt") as versionfle:
verstrline = versionfle.read()
version_re = r"^__version__ = ['\"]([^'\"]*)['\"]"
mo = re.search(version_re, verstrline, re.M)
if mo:
ver_str = mo.group(1)
else:
raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,))
# read the contents of your README file
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setup(name='initpkg',
version=ver_str,
description='python package creator',
url='http://github.com/wlongxiang/initpkg',
author='Benjamin Wang',
author_email='wlongxiang1119@gmail.com',
license='MIT',
packages=['initpkg'],
package_dir={'initpkg': 'initpkg'},
package_data={'initpkg': ['template/**/*', "template/*", "template/.gitignore", "template/.pylintrc"]},
include_package_data=True,
long_description=long_description,
long_description_content_type='text/markdown',
entry_points={
'console_scripts': [
'initpkg=initpkg.cli:main',
],
},
)