tartube/setup.py

99 lines
3.1 KiB
Python
Raw Normal View History

2019-05-27 15:53:14 +01:00
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (C) 2019 A S Lewis
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <http://www.gnu.org/licenses/>.
"""Standard python setup file."""
# Import modules
2019-08-14 13:15:39 +01:00
import os
2019-05-28 14:48:25 +01:00
import setuptools
2019-08-14 13:15:39 +01:00
import sys
2019-05-27 15:53:14 +01:00
# Import documents
2019-05-28 14:48:25 +01:00
#with open('README.rst', 'r') as f:
# long_description = f.read()
#
#with open('LICENSE') as f:
# license = f.read()
2019-05-27 15:53:14 +01:00
2019-08-14 13:15:39 +01:00
# For the Debian distribution, use an environment variable. When specified,
# the default executable 'tartube' is replaced by the 'tartube_debian'
# executiable, in which youtube-dl updates are disabled
# The package maintainer should use
2019-08-18 11:36:04 +01:00
# TARTUBE_NO_UPDATES=1 python3 setup.py build
2019-08-14 13:15:39 +01:00
env_var_name = 'TARTUBE_NO_UPDATES'
env_var_value = os.environ.get( env_var_name, None )
script_name = 'tartube'
script_exec = 'tartube'
2019-08-14 13:15:39 +01:00
if env_var_value is not None:
if env_var_value == '1':
script_exec = 'tartube_debian'
2019-08-14 13:15:39 +01:00
sys.stderr.write('youtube-dl updates are disabled in this version')
else:
sys.stderr.write(
"Unrecognised '%s=%s' environment variable!\n" % (
env_var_name,
env_var_value,
),
)
2019-08-18 11:36:04 +01:00
2019-05-27 15:53:14 +01:00
# Setup
2019-05-28 14:48:25 +01:00
setuptools.setup(
2019-05-27 15:53:14 +01:00
name='tartube',
2019-08-18 11:36:04 +01:00
version='1.1.0',
2019-05-27 15:53:14 +01:00
description='GUI front-end for youtube-dl',
2019-05-28 14:48:25 +01:00
# long_description=long_description,
2019-06-23 09:51:50 +01:00
long_description="""Tartube is a GUI front-end for youtube-dl, partly based
on youtube-dl-gui and written in Python 3 / Gtk 3""",
2019-06-03 10:57:30 +01:00
long_description_content_type='text/markdown',
2019-07-04 17:42:11 +01:00
url='https://tartube.sourceforge.io',
2019-05-27 15:53:14 +01:00
author='A S Lewis',
author_email='aslewis@cpan.org',
2019-05-28 14:48:25 +01:00
# license=license,
2019-07-04 17:42:11 +01:00
# license="""GPL3+""",
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: End Users/Desktop',
'Topic :: Multimedia :: Video',
'License :: OSI Approved' \
+ ' :: GNU General Public License v3 or later (GPLv3+)',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
],
keywords='tartube video download youtube',
packages=setuptools.find_packages(
exclude=('docs', 'icons', 'nsis', 'tests'),
),
python_requires='>=3.0, <4',
install_requires=['requests'],
scripts=[script_exec],
2019-07-04 17:42:11 +01:00
project_urls={
'Bug Reports': 'https://github.com/axcore/tartube/issues',
'Source': 'https://github.com/axcore/tartube',
},
2019-05-27 15:53:14 +01:00
)