Andrew Geissler | 84ad7c5 | 2020-06-27 00:00:16 -0500 | [diff] [blame] | 1 | From 70b38f8748779d57117bca3e37441e2223372293 Mon Sep 17 00:00:00 2001 |
| 2 | From: Peter Ogden <ogden@xilinx.com> |
| 3 | Date: Tue, 3 Mar 2020 06:23:26 -0500 |
| 4 | Subject: [PATCH 2/3] Avoid deleteing notebooks |
| 5 | |
| 6 | --- |
| 7 | setup.py | 5 +++-- |
| 8 | 1 file changed, 3 insertions(+), 2 deletions(-) |
| 9 | |
| 10 | diff --git a/setup.py b/setup.py |
| 11 | index df1dada..95479e3 100644 |
| 12 | --- a/setup.py |
| 13 | +++ b/setup.py |
| 14 | @@ -36,6 +36,7 @@ from setuptools.command.build_ext import build_ext |
| 15 | from distutils.dir_util import copy_tree |
| 16 | from distutils.file_util import copy_file, move_file |
| 17 | from shutil import rmtree |
| 18 | +import shutil |
| 19 | import glob |
| 20 | import re |
| 21 | import subprocess |
| 22 | @@ -322,8 +323,8 @@ class BuildExtension(build_ext): |
| 23 | for ol in overlay_dirs: |
| 24 | src = os.path.join(board_folder, ol) |
| 25 | dst = os.path.join(self.build_lib, "pynq/overlays", ol) |
| 26 | - exclude_file_or_folder('notebooks', src) |
| 27 | - copy_tree(src, dst) |
| 28 | + if not os.path.isdir(dst): |
| 29 | + shutil.copytree(src, dst, ignore=shutil.ignore_patterns('notebooks')) |
| 30 | |
| 31 | def run(self): |
| 32 | if CPU_ARCH == ZYNQ_ARCH: |
| 33 | -- |
| 34 | 2.7.4 |
| 35 | |