forked from ftd2xx/ftd2xx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
61 lines (51 loc) · 1.65 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
from __future__ import print_function
import os
import subprocess
from distutils.command.build_py import build_py
from distutils.command.build_scripts import build_scripts
from setuptools import find_packages, setup
# import sys
mydir = os.path.dirname(__file__)
version = ""
try:
version = (
subprocess.check_output(["git", "tag", "--points-at", "HEAD"])
.decode("ascii")
.strip()
)
if version.startswith("v"):
version = version[1:]
except subprocess.CalledProcessError:
pass
if version == "":
with open(os.path.join(mydir, "myversion.txt"), "r") as f:
version = f.read().strip()
with open("README.rst") as f:
long_description = f.read()
setup(
name="ftd2xx",
version=version,
packages=find_packages(),
# metadata for upload to PyPI
author="Satya Mishra",
author_email="[email protected]",
description=(
"Python interface to ftd2xx.dll from FTDI using ctypes"
"based on d2xx by Pablo Bleyer"
),
long_description=long_description,
long_description_content_type="text/x-rst",
license="MIT",
keywords="ftd2xx d2xx ftdi",
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
url="https://github.com/snmishra/ftd2xx", # project home page, if any
zip_safe=False,
test_suite="ftd2xx.tests.t_ftd2xx",
cmdclass={"build_py": build_py, "build_scripts": build_scripts},
# could also include long_description, download_url, classifiers, etc.
install_requires=(["future", 'pywin32; platform_system == "Windows"']),
)