Skip to content

Commit

Permalink
Build python wheel for eservice
Browse files Browse the repository at this point in the history
Signed-off-by: Marcela Melara <[email protected]>
  • Loading branch information
marcelamelara committed Jul 5, 2023
1 parent 0bda9a3 commit 21dfd82
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
1 change: 1 addition & 0 deletions build/python_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
build>=0.10.0
colorlog>=6.7.0
lmdb>=1.4.0
loguru>=0.6.0
Expand Down
15 changes: 9 additions & 6 deletions eservice/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ ifneq ($(basename ${PY_VERSION}),3)
$(error must be run with python3)
endif

EGG_FILE=dist/pdo_eservice-${MOD_VERSION}-py${PY_VERSION}-linux-x86_64.egg
# wheels are now built with a PY_VERSION without the dot separation
PY_VERSION_NODOT=$(shell echo ${PY_VERSION} | sed 's/\.//g')

WHEEL_FILE=dist/pdo_eservice-${MOD_VERSION}-cp${PY_VERSION_NODOT}-cp${PY_VERSION_NODOT}-linux_x86_64.whl

ENCLAVE_LIB=deps/bin/libpdo-enclave.signed.so

Expand Down Expand Up @@ -52,12 +55,12 @@ SCRIPTS = \
TEST_LOG_LEVEL ?= warn
TEST_LOG_FILE ?= __screen__

all : $(ENCLAVE_LIB) $(EGG_FILE)
all : $(ENCLAVE_LIB) $(WHEEL_FILE)

$(EGG_FILE) : $(ENCLAVE_LIB) $(SWIG_TARGET) $(PYTHON_FILES) $(SCRIPTS)
$(WHEEL_FILE) : $(ENCLAVE_LIB) $(SWIG_TARGET) $(PYTHON_FILES) $(SCRIPTS)
@echo Build Distribution
@ . $(abspath $(DSTDIR)/bin/activate) && \
python3 setup.py bdist_egg
python3 -m build --wheel .

$(ENCLAVE_LIB) : build
@echo Build Enclave
Expand All @@ -71,9 +74,9 @@ build :
mkdir $@
cd $@ && cmake .. -G "Unix Makefiles"

install: $(EGG_FILE)
install: $(WHEEL_FILE)
@ . $(abspath $(DSTDIR)/bin/activate) && \
python3 setup.py install
pip install $(WHEEL_FILE)

# these cannot be run in the current directory because python tries to
# pick up the local versions of the library which do not have the same
Expand Down
7 changes: 3 additions & 4 deletions eservice/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,12 @@
version = subprocess.check_output(
os.path.join(pdo_root_dir, 'bin/get_version')).decode('ascii').strip()

setup(name='pdo_eservice',
setup(name='pdo-eservice',
version = version,
description = 'Private Data Objects SGX Contract Enclave',
author = 'Hyperledger',
url = 'http://www.intel.com',
author = 'Hyperledger Labs PDO maintainers',
url = 'https://github.com/hyperledger-labs/private-data-objects',
packages = find_packages(exclude='./eservice'),
namespace_packages=['pdo'],
install_requires = [
'colorlog',
'lmdb',
Expand Down

0 comments on commit 21dfd82

Please sign in to comment.