forked from return42/linuxdoc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·38 lines (32 loc) · 1.12 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
#!/usr/bin/env python
# -*- coding: utf-8; mode: python -*-
# pylint: disable=invalid-name, missing-docstring
import os
from os.path import join as ospj
import io
import imp
from setuptools import setup, find_packages
_dir = os.path.abspath(os.path.dirname(__file__))
SRC = ospj(_dir, 'linuxdoc')
README = ospj(_dir, 'README.rst')
DOCS = ospj(_dir, 'docs')
TESTS = ospj(_dir, 'tests')
PKG = imp.load_source('__pkginfo__', ospj(SRC, '__pkginfo__.py'))
def readFile(fname, m='rt', enc='utf-8', nl=None):
with io.open(fname, mode=m, encoding=enc, newline=nl) as f:
return f.read()
setup(
name = PKG.package
, version = PKG.version
, description = PKG.description
, long_description = readFile(README)
, url = PKG.url
, author = PKG.authors[0]
, author_email = PKG.emails[0]
, license = PKG.license
, keywords = PKG.keywords
, packages = find_packages(exclude=['docs', ])
, install_requires = PKG.install_requires
, entry_points = PKG.get_entry_points()
, classifiers = PKG.classifiers
)