2015-10-04 23:21:12 +03:00
|
|
|
#!/usr/bin/env python3
|
2012-08-31 19:20:38 +04:00
|
|
|
|
2013-02-13 01:04:39 +04:00
|
|
|
PROJ_NAME = 'you-get'
|
|
|
|
PACKAGE_NAME = 'you_get'
|
|
|
|
|
|
|
|
PROJ_METADATA = '%s.json' % PROJ_NAME
|
2012-08-31 19:20:38 +04:00
|
|
|
|
2024-05-09 12:18:11 +03:00
|
|
|
import importlib.util
|
|
|
|
import importlib.machinery
|
|
|
|
|
|
|
|
def load_source(modname, filename):
|
|
|
|
loader = importlib.machinery.SourceFileLoader(modname, filename)
|
|
|
|
spec = importlib.util.spec_from_file_location(modname, filename, loader=loader)
|
|
|
|
module = importlib.util.module_from_spec(spec)
|
|
|
|
# The module is always executed and not cached in sys.modules.
|
|
|
|
# Uncomment the following line to cache the module.
|
|
|
|
# sys.modules[module.__name__] = module
|
|
|
|
loader.exec_module(module)
|
|
|
|
return module
|
|
|
|
|
|
|
|
import os, json
|
2012-08-31 19:20:38 +04:00
|
|
|
here = os.path.abspath(os.path.dirname(__file__))
|
2013-11-30 18:43:00 +04:00
|
|
|
proj_info = json.loads(open(os.path.join(here, PROJ_METADATA), encoding='utf-8').read())
|
2014-09-21 06:39:07 +04:00
|
|
|
try:
|
|
|
|
README = open(os.path.join(here, 'README.rst'), encoding='utf-8').read()
|
|
|
|
except:
|
|
|
|
README = ""
|
2014-09-21 06:21:40 +04:00
|
|
|
CHANGELOG = open(os.path.join(here, 'CHANGELOG.rst'), encoding='utf-8').read()
|
2024-05-09 12:18:11 +03:00
|
|
|
VERSION = load_source('version', os.path.join(here, 'src/%s/version.py' % PACKAGE_NAME)).__version__
|
2012-08-31 19:20:38 +04:00
|
|
|
|
2012-09-01 02:55:45 +04:00
|
|
|
from setuptools import setup, find_packages
|
2012-08-31 19:20:38 +04:00
|
|
|
setup(
|
|
|
|
name = proj_info['name'],
|
2012-12-09 20:33:24 +04:00
|
|
|
version = VERSION,
|
2013-11-30 18:43:00 +04:00
|
|
|
|
2012-08-31 19:20:38 +04:00
|
|
|
author = proj_info['author'],
|
|
|
|
author_email = proj_info['author_email'],
|
|
|
|
url = proj_info['url'],
|
|
|
|
license = proj_info['license'],
|
2013-11-30 18:43:00 +04:00
|
|
|
|
2012-08-31 19:20:38 +04:00
|
|
|
description = proj_info['description'],
|
|
|
|
keywords = proj_info['keywords'],
|
2013-11-30 18:43:00 +04:00
|
|
|
|
2015-10-23 02:53:42 +03:00
|
|
|
long_description = README,
|
2013-11-30 18:43:00 +04:00
|
|
|
|
2013-02-13 01:04:39 +04:00
|
|
|
packages = find_packages('src'),
|
|
|
|
package_dir = {'' : 'src'},
|
2013-11-30 18:43:00 +04:00
|
|
|
|
2013-02-13 01:04:39 +04:00
|
|
|
test_suite = 'tests',
|
2013-11-30 18:43:00 +04:00
|
|
|
|
2012-09-01 02:55:45 +04:00
|
|
|
platforms = 'any',
|
2015-11-12 01:42:50 +03:00
|
|
|
zip_safe = True,
|
2012-09-01 02:55:45 +04:00
|
|
|
include_package_data = True,
|
2013-11-30 18:43:00 +04:00
|
|
|
|
2012-09-01 02:55:45 +04:00
|
|
|
classifiers = proj_info['classifiers'],
|
2013-11-30 18:43:00 +04:00
|
|
|
|
2020-01-25 07:11:41 +03:00
|
|
|
entry_points = {'console_scripts': proj_info['console_scripts']},
|
|
|
|
|
2024-06-23 11:17:02 +03:00
|
|
|
install_requires = ['dukpy'],
|
|
|
|
extras_require = {
|
2020-01-25 07:11:41 +03:00
|
|
|
'socks': ['PySocks'],
|
|
|
|
}
|
2012-08-31 19:20:38 +04:00
|
|
|
)
|