Merge pull request #1337 from antmicro/add-setup-package

Adds installation of Xray tools
This commit is contained in:
litghost 2020-05-22 07:56:00 -07:00 committed by GitHub
commit d42b8b94ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 12 additions and 5 deletions

View File

@ -1,6 +1,8 @@
SHELL = bash SHELL = bash
ALL_EXCLUDE = third_party .git env build docs/env ALL_EXCLUDE = third_party .git env build docs/env
INSTALL_DIR ?=
# Check if root # Check if root
ifeq ($(shell id -u),0) ifeq ($(shell id -u),0)
$(error ERROR: Running as ID 0) $(error ERROR: Running as ID 0)
@ -35,6 +37,9 @@ build:
mkdir -p build mkdir -p build
cd build; cmake ..; $(MAKE) cd build; cmake ..; $(MAKE)
install:
cd build; $(MAKE) DESTDIR=${INSTALL_DIR} install
.PHONY: env build .PHONY: env build
# Run tests of code. # Run tests of code.

View File

@ -12,7 +12,7 @@ setuptools.setup(
long_description=long_description, long_description=long_description,
long_description_content_type="text/markdown", long_description_content_type="text/markdown",
url="https://github.com/SymbiFlow/prjxray", url="https://github.com/SymbiFlow/prjxray",
packages=setuptools.find_packages(), packages=['prjxray', 'utils'],
classifiers=[ classifiers=[
"Programming Language :: Python :: 3", "Programming Language :: Python :: 3",
"License :: OSI Approved :: ISC License", "License :: OSI Approved :: ISC License",

View File

@ -33,3 +33,5 @@ target_link_libraries(xc7frames2bit
gflags gflags
libprjxray libprjxray
) )
install(TARGETS xc7frames2bit xc7patch gen_part_base_yaml frame_address_decoder bittool segmatch bitread DESTINATION bin)

0
utils/__init__.py Normal file
View File

View File

@ -12,7 +12,7 @@ Relies on 074, which is too far into the process
from prjxray import util from prjxray import util
from prjxray import db as prjxraydb from prjxray import db as prjxraydb
import os import os
import parsedb import utils.parsedb as parsedb
#from prjxray import db as prjxraydb #from prjxray import db as prjxraydb
import glob import glob

View File

@ -54,8 +54,8 @@ import re
import sys import sys
import json import json
import xjson import utils.xjson as xjson
import cmp import utils.cmp as cmp
def split_all(s, chars): def split_all(s, chars):

View File

@ -9,7 +9,7 @@ import unittest
import tempfile import tempfile
import prjxray import prjxray
import fasm2frames import utils.fasm2frames as fasm2frames
from textx.exceptions import TextXSyntaxError from textx.exceptions import TextXSyntaxError