From 12bf76f89732bfa6c03c7e0c1157d1eb99febb91 Mon Sep 17 00:00:00 2001 From: Alessandro Comodi Date: Thu, 21 May 2020 13:41:08 +0200 Subject: [PATCH 1/3] setup: include utils directory Signed-off-by: Alessandro Comodi --- setup.py | 2 +- utils/__init__.py | 0 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 utils/__init__.py diff --git a/setup.py b/setup.py index d420015b..1d3a640f 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ setuptools.setup( long_description=long_description, long_description_content_type="text/markdown", url="https://github.com/SymbiFlow/prjxray", - packages=setuptools.find_packages(), + packages=['prjxray', 'utils'], classifiers=[ "Programming Language :: Python :: 3", "License :: OSI Approved :: ISC License", diff --git a/utils/__init__.py b/utils/__init__.py new file mode 100644 index 00000000..e69de29b From 60d0ec43726bf134daa8e81e7a0ac089ed97f742 Mon Sep 17 00:00:00 2001 From: Alessandro Comodi Date: Thu, 21 May 2020 13:58:45 +0200 Subject: [PATCH 2/3] tools: added INSTALL cmake command Signed-off-by: Alessandro Comodi --- Makefile | 5 +++++ tools/CMakeLists.txt | 2 ++ 2 files changed, 7 insertions(+) diff --git a/Makefile b/Makefile index ecc11881..0db670ee 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,8 @@ SHELL = bash ALL_EXCLUDE = third_party .git env build docs/env +INSTALL_DIR ?= + # Check if root ifeq ($(shell id -u),0) $(error ERROR: Running as ID 0) @@ -35,6 +37,9 @@ build: mkdir -p build cd build; cmake ..; $(MAKE) +install: + cd build; $(MAKE) DESTDIR=${INSTALL_DIR} install + .PHONY: env build # Run tests of code. diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 2ebadf19..6a166ebe 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -33,3 +33,5 @@ target_link_libraries(xc7frames2bit gflags libprjxray ) + +install(TARGETS xc7frames2bit xc7patch gen_part_base_yaml frame_address_decoder bittool segmatch bitread DESTINATION bin) From 28a93e08cc2924cbd1a440e899c97e956c57e731 Mon Sep 17 00:00:00 2001 From: Alessandro Comodi Date: Thu, 21 May 2020 16:32:49 +0200 Subject: [PATCH 3/3] fix pytest Signed-off-by: Alessandro Comodi --- utils/checkdb.py | 2 +- utils/sort_db.py | 4 ++-- utils/test_fasm2frames.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/utils/checkdb.py b/utils/checkdb.py index b1ec607f..52cb6f3d 100755 --- a/utils/checkdb.py +++ b/utils/checkdb.py @@ -12,7 +12,7 @@ Relies on 074, which is too far into the process from prjxray import util from prjxray import db as prjxraydb import os -import parsedb +import utils.parsedb as parsedb #from prjxray import db as prjxraydb import glob diff --git a/utils/sort_db.py b/utils/sort_db.py index 90444ba6..daf940b1 100755 --- a/utils/sort_db.py +++ b/utils/sort_db.py @@ -54,8 +54,8 @@ import re import sys import json -import xjson -import cmp +import utils.xjson as xjson +import utils.cmp as cmp def split_all(s, chars): diff --git a/utils/test_fasm2frames.py b/utils/test_fasm2frames.py index 9b1e1258..60fc4958 100755 --- a/utils/test_fasm2frames.py +++ b/utils/test_fasm2frames.py @@ -9,7 +9,7 @@ import unittest import tempfile import prjxray -import fasm2frames +import utils.fasm2frames as fasm2frames from textx.exceptions import TextXSyntaxError