-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
65 lines (57 loc) · 1.76 KB
/
setup.py
File metadata and controls
65 lines (57 loc) · 1.76 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import (
division, absolute_import, print_function, unicode_literals,
)
import codecs
import imp
import os
from setuptools import setup, find_packages
# load metadata.
metadata = imp.load_source(
'metadata',
os.path.join('img2url', 'metadata.py'),
)
def read(fname):
file_path = os.path.join(os.path.dirname(__file__), fname)
return codecs.open(file_path, encoding='utf-8').read()
def load_requirements(fname):
# only handles a simple subset of requirements format.
pkgs = []
for line in read(fname).split(os.linesep):
if not line or line.startswith('#'):
continue
pkgs.append(line)
return pkgs
setup(
# informations.
name=metadata.NAME,
version=metadata.VERSION,
author=metadata.AUTHORS[0],
author_email=metadata.EMAILS[0],
maintainer=metadata.AUTHORS[0],
maintainer_email=metadata.EMAILS[0],
license=metadata.LICENSE,
url=metadata.URL,
description=metadata.DESCRIPTION,
long_description=read('README.md'),
# https://pypi.python.org/pypi?:action=list_classifiers
classifiers=[
'License :: OSI Approved :: MIT License',
'Development Status :: 1 - Planning',
'Intended Audience :: Developers',
'Topic :: Software Development :: Libraries',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
# critical configurations.
packages=find_packages(),
install_requires=load_requirements('requirements.txt'),
entry_points={
'console_scripts': [
'img2url = img2url.main:entry_point'
],
},
)