Clean up python install process.

Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
This commit is contained in:
Keith Rothman 2020-09-09 09:40:53 -07:00
parent fa6840e6db
commit c7033a6a19
4 changed files with 7 additions and 12 deletions

View File

@ -66,6 +66,7 @@ sudo apt-get install -y \
python3 \
python3-dev \
python3-virtualenv \
python3-venv \
python3-yaml \
virtualenv \

View File

@ -18,18 +18,13 @@ endif
# Tools + Environment
IN_ENV = if [ -e env/bin/activate ]; then . env/bin/activate; fi; source utils/environment.python.sh;
env:
virtualenv --python=python3 env
# Install prjxray
ln -sf $(PWD)/prjxray env/lib/python3.*/site-packages/
$(IN_ENV) python -c "import prjxray"
# Install fasm from third_party
$(IN_ENV) pip install --upgrade -e third_party/fasm
# Install sdfparse form third party
$(IN_ENV) pip install --upgrade -e third_party/python-sdf-timing
python3 -mvenv env
# Install project dependencies
$(IN_ENV) pip install -r requirements.txt
$(IN_ENV) python -mpip install -r requirements.txt
# Install project's documentation dependencies
$(IN_ENV) pip install -r docs/requirements.txt
$(IN_ENV) python -mpip install -r docs/requirements.txt
# Check that prjxray are available
$(IN_ENV) python -c "import prjxray"
# Check fasm library was installed
$(IN_ENV) python -c "import fasm"
$(IN_ENV) python -c "import fasm.output"

View File

@ -1,5 +1,6 @@
-e third_party/fasm
-e third_party/python-sdf-timing
-e .
intervaltree
junit-xml
numpy

View File

@ -1,4 +1,3 @@
# FIXME: fasm should be installed into the running Python environment.
# Copyright (C) 2017-2020 The Project X-Ray Authors.
#
# Use of this source code is governed by a ISC-style
@ -6,7 +5,6 @@
# https://opensource.org/licenses/ISC
#
# SPDX-License-Identifier: ISC
export PYTHONPATH="${XRAY_DIR}:${XRAY_DIR}/third_party/fasm:$PYTHONPATH"
# Suppress the following warnings;
# - env/lib/python3.7/distutils/__init__.py:4: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses