qutebrowser/setup.py

55 lines
1.6 KiB
Python
Raw Normal View History

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:
2014-05-13 11:41:27 +02:00
# Copyright 2014 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# 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/>.
"""setuptools installer script for qutebrowser"""
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
try:
2014-08-26 19:10:14 +02:00
common.write_git_file()
setuptools.setup(
packages=setuptools.find_packages(exclude=['qutebrowser.test']),
include_package_data=True,
entry_points={'gui_scripts':
2014-06-04 14:11:55 +02:00
['qutebrowser = qutebrowser.qutebrowser:main']},
test_suite='qutebrowser.test',
zip_safe=True,
2014-09-15 17:59:33 +02:00
install_requires=['pypeg2', 'jinja2', 'pygments'],
2014-08-26 19:10:14 +02:00
**common.setupdata
)
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)