2014-09-22 20:21:00 +02:00
|
|
|
#!/usr/bin/env python3
|
2014-06-19 09:04:37 +02:00
|
|
|
|
|
|
|
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
|
|
|
|
|
2015-01-03 15:51:31 +01:00
|
|
|
# Copyright 2014-2015 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
|
2014-05-13 11:41:27 +02:00
|
|
|
#
|
|
|
|
# This file is part of qutebrowser.
|
|
|
|
#
|
|
|
|
# qutebrowser 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.
|
|
|
|
#
|
|
|
|
# qutebrowser 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 qutebrowser. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
2016-02-10 19:18:47 +01:00
|
|
|
"""setuptools installer script for qutebrowser."""
|
2014-05-13 11:41:27 +02:00
|
|
|
|
2014-05-15 07:13:49 +02:00
|
|
|
import os
|
|
|
|
import os.path
|
2014-05-13 11:41:27 +02:00
|
|
|
|
2014-08-26 19:10:14 +02:00
|
|
|
from scripts import setupcommon as common
|
2014-04-28 23:20:24 +02:00
|
|
|
|
2014-08-26 19:10:14 +02:00
|
|
|
import setuptools
|
2014-04-28 23:20:24 +02:00
|
|
|
|
|
|
|
|
2014-12-28 14:52:35 +01:00
|
|
|
try:
|
2014-12-28 15:05:49 +01:00
|
|
|
BASEDIR = os.path.dirname(os.path.realpath(__file__))
|
|
|
|
except NameError:
|
|
|
|
BASEDIR = None
|
2014-05-15 07:13:49 +02:00
|
|
|
|
|
|
|
|
|
|
|
try:
|
2014-08-26 19:10:14 +02:00
|
|
|
common.write_git_file()
|
|
|
|
setuptools.setup(
|
2015-06-26 19:45:56 +02:00
|
|
|
packages=setuptools.find_packages(exclude=['scripts', 'scripts.*']),
|
2014-05-15 07:13:49 +02:00
|
|
|
include_package_data=True,
|
|
|
|
entry_points={'gui_scripts':
|
2014-06-04 14:11:55 +02:00
|
|
|
['qutebrowser = qutebrowser.qutebrowser:main']},
|
2014-05-15 07:13:49 +02:00
|
|
|
test_suite='qutebrowser.test',
|
|
|
|
zip_safe=True,
|
2015-02-16 20:26:09 +01:00
|
|
|
install_requires=['pypeg2', 'jinja2', 'pygments', 'PyYAML'],
|
2014-08-26 19:10:14 +02:00
|
|
|
**common.setupdata
|
2014-05-15 07:13:49 +02:00
|
|
|
)
|
|
|
|
finally:
|
2014-12-28 15:05:49 +01:00
|
|
|
if BASEDIR is not None:
|
|
|
|
path = os.path.join(BASEDIR, 'qutebrowser', 'git-commit-id')
|
|
|
|
if os.path.exists(path):
|
|
|
|
os.remove(path)
|