3 from os.path import abspath, dirname, join
4 from setuptools import setup
7 if sys.version_info[:2] == (2, 7):
8 from imp import load_source
10 elif sys.version_info >= (3, 4):
11 from importlib.machinery import SourceFileLoader
14 def load_source(fullname, path):
15 loader = SourceFileLoader(fullname, path)
16 loaded = types.ModuleType(loader.name)
17 loader.exec_module(loaded)
21 raise ImportError("ppu requires Python 2.7 or 3.4+")
23 versionpath = join(abspath(dirname(__file__)), "ppu", "__version__.py")
24 ppu_version = load_source("ppu_version", versionpath)
28 version=ppu_version.__version__,
29 description='Broytman Portable Python Utilities',
30 long_description=open('README.rst', 'rU').read(),
31 long_description_content_type="text/x-rst",
32 author='Oleg Broytman',
33 author_email='phd@phdru.name',
34 url='https://phdru.name/Software/Python/ppu/',
36 'Homepage': 'https://phdru.name/Software/Python/ppu/',
37 'Documentation': 'https://phdru.name/Software/Python/ppu/docs/',
38 'Download': 'https://pypi.org/project/ppu/%s/'
39 % ppu_version.__version__,
40 'Git repo': 'https://git.phdru.name/ppu.git/',
41 'Github repo': 'https://github.com/phdru/ppu',
42 'Issue tracker': 'https://github.com/phdru/ppu/issues',
47 'Development Status :: 5 - Production/Stable',
48 'Environment :: Console',
49 'Intended Audience :: End Users/Desktop',
50 'License :: OSI Approved :: GNU General Public License (GPL)',
51 'Operating System :: OS Independent',
52 'Programming Language :: Python :: Implementation :: CPython',
53 'Programming Language :: Python :: Implementation :: PyPy',
54 'Programming Language :: Python :: 2',
55 'Programming Language :: Python :: 2.7',
56 'Programming Language :: Python :: 3',
57 'Programming Language :: Python :: 3.4',
58 'Programming Language :: Python :: 3.5',
59 'Programming Language :: Python :: 3.6',
60 'Programming Language :: Python :: 3.7',
64 'scripts/cmp.py', 'scripts/remove-old-files.py', 'scripts/rm.py',
67 python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',