This repository has been archived by the owner on May 17, 2021. It is now read-only.
forked from Xilinx/Alveo-PYNQ
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
97 lines (88 loc) · 3.1 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# Copyright (C) 2020 Xilinx, Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from setuptools import setup, find_packages
import os
from pynq.utils import build_py
__author__ = "Giuseppe Natale"
__copyright__ = "Copyright 2020, Xilinx"
__email__ = "[email protected]"
# global variables
module_name = "pynq_alveo_examples"
data_files = []
def extend_package(path):
if os.path.isdir(path):
data_files.extend(
[os.path.join("..", root, f)
for root, _, files in os.walk(path) for f in files]
)
elif os.path.isfile(path):
data_files.append(os.path.join("..", path))
with open("README.md", encoding="utf-8") as fh:
readme_lines = fh.readlines()[2:]
long_description = ("".join(readme_lines))
extend_package(os.path.join(module_name, "notebooks"))
setup(name=module_name,
version="1.0",
description="Introductory Examples for using PYNQ with Alveo",
long_description=long_description,
long_description_content_type="text/markdown",
author="Giuseppe Natale",
author_email="[email protected]",
url="https://github.com/Xilinx/Alveo-PYNQ",
packages=find_packages(),
download_url="https://github.com/Xilinx/Alveo-PYNQ",
package_data={
"": data_files,
},
python_requires=">=3.5.2",
# keeping 'setup_requires' only for readability - relying on
# pyproject.toml and PEP 517/518
setup_requires=[
"pynq>=2.5.1"
],
install_requires=[
"pynq>=2.5.1",
"jupyter",
"jupyterlab",
"plotly",
"lz4"
],
extras_require={
':python_version<"3.6"': [
'matplotlib<3.1',
'ipython==7.9'
],
':python_version>="3.6"': [
'matplotlib'
]
},
entry_points={
"pynq.notebooks": [
"0-welcome-to-pynq = {}.notebooks.0_welcome_to_pynq".format(
module_name),
"1-introduction = {}.notebooks.1_introduction".format(
module_name),
"2-kernel-optimization = {}.notebooks."
"2_kernel_optimization".format(module_name),
"3-advanced-features = {}.notebooks.3_advanced_features".format(
module_name),
"4-building-and-emulation = {}.notebooks."
"4_building_and_emulation".format(module_name),
"data-compression = {}.notebooks.data_compression".format(
module_name)
]
},
cmdclass={"build_py": build_py},
license="Apache License 2.0"
)