2018-11-26 20:41:23 +03:00
|
|
|
from setuptools import setup, find_packages
|
|
|
|
|
2018-12-03 04:42:57 +03:00
|
|
|
|
|
|
|
def get_version(relpath):
|
|
|
|
"""Read version info from a file without importing it"""
|
|
|
|
from os.path import dirname, join
|
|
|
|
|
2018-12-04 01:37:35 +03:00
|
|
|
if "__file__" not in globals():
|
2018-12-03 04:42:57 +03:00
|
|
|
# Allow to use function interactively
|
2018-12-04 01:37:35 +03:00
|
|
|
root = "."
|
2018-12-03 04:42:57 +03:00
|
|
|
else:
|
|
|
|
root = dirname(__file__)
|
|
|
|
|
|
|
|
# The code below reads text file with unknown encoding in
|
|
|
|
# in Python2/3 compatible way. Reading this text file
|
|
|
|
# without specifying encoding will fail in Python 3 on some
|
|
|
|
# systems (see http://goo.gl/5XmOH). Specifying encoding as
|
|
|
|
# open() parameter is incompatible with Python 2
|
|
|
|
|
|
|
|
# cp437 is the encoding without missing points, safe against:
|
|
|
|
# UnicodeDecodeError: 'charmap' codec can't decode byte...
|
|
|
|
|
2018-12-04 01:37:35 +03:00
|
|
|
for line in open(join(root, relpath), "rb"):
|
|
|
|
line = line.decode("cp437")
|
|
|
|
if "__version__" in line:
|
2018-12-03 04:42:57 +03:00
|
|
|
if '"' in line:
|
|
|
|
return line.split('"')[1]
|
|
|
|
elif "'" in line:
|
|
|
|
return line.split("'")[1]
|
|
|
|
|
|
|
|
|
|
|
|
setup(
|
2018-12-07 18:46:23 +03:00
|
|
|
name="birdbox",
|
|
|
|
version=get_version("birdbox/main.py"),
|
2018-12-03 04:42:57 +03:00
|
|
|
description="Open-source Dropbox client for macOS and Linux.",
|
2018-12-07 18:46:23 +03:00
|
|
|
url="https://github.com/SamSchott/birdbox",
|
2018-12-03 04:42:57 +03:00
|
|
|
author="Sam Schott",
|
|
|
|
author_email="ss2151@cam.ac.uk",
|
|
|
|
licence="MIT",
|
|
|
|
long_description=open("README.md").read(),
|
|
|
|
packages=find_packages(),
|
|
|
|
package_data={
|
2018-12-07 18:46:23 +03:00
|
|
|
"birdbox": [
|
2018-12-04 01:37:35 +03:00
|
|
|
"gui/*.ui",
|
|
|
|
"gui/resources/*.icns",
|
2018-12-07 22:09:20 +03:00
|
|
|
"gui/resources/*.png",
|
|
|
|
"gui/resources/*.svg",
|
2018-12-03 04:42:57 +03:00
|
|
|
],
|
|
|
|
},
|
|
|
|
install_requires=[
|
|
|
|
"dropbox",
|
|
|
|
"watchdog",
|
2018-12-04 01:37:35 +03:00
|
|
|
"blinker",
|
2018-12-03 04:42:57 +03:00
|
|
|
],
|
|
|
|
zip_safe=False,
|
|
|
|
entry_points={
|
2018-12-07 18:46:23 +03:00
|
|
|
"console_scripts": ["birdbox=birdbox.bin.command_line:main"],
|
2018-12-03 04:42:57 +03:00
|
|
|
}
|
|
|
|
)
|