Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for pdb and python wheel compatibility #584

Merged
merged 2 commits into from Jun 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions ci/azure-wheel-test-upload.yml
Expand Up @@ -15,6 +15,11 @@ steps:
packaging/python/test_wheels.sh $(which python) wheelhouse/*.whl
displayName: 'Test with System Python'

- task: PublishBuildArtifacts@1
inputs:
pathToPublish: '$(Build.SourcesDirectory)/wheelhouse'
displayName: 'Publish wheel as build artifact'

- task: TwineAuthenticate@1
inputs:
pythonUploadServiceConnection: AzureNeuronPypiNightly
Expand Down
5 changes: 5 additions & 0 deletions cmake/CMakeListsNrnMech.cmake
Expand Up @@ -22,6 +22,11 @@ list(REMOVE_ITEM NRN_LINK_LIBS "interviews")

# CMake does some magic to transform sys libs to -l<libname>. We replicate it
foreach(link_lib ${NRN_LINK_LIBS})
# skip static readline library as it will be linked to nrniv (e.g. with wheel)
if ("${link_lib}" MATCHES "libreadline.a")
continue()
endif()

get_filename_component(dir_path ${link_lib} DIRECTORY)
if(NOT dir_path)
string(APPEND NRN_LINK_DEFS " -l${link_lib}")
Expand Down
13 changes: 13 additions & 0 deletions packaging/python/Dockerfile
Expand Up @@ -44,6 +44,19 @@ RUN curl -L -o openmpi-4.0.3.tar.gz https://download.open-mpi.org/release/open-
&& ./configure --prefix=/opt/openmpi \
&& make -j install

RUN curl -L -o readline-7.0.tar.gz https://ftp.gnu.org/gnu/readline/readline-7.0.tar.gz \
&& tar -xvzf readline-7.0.tar.gz \
&& cd readline-7.0 \
&& ./configure --prefix=/opt/readline --disable-shared CFLAGS="-fPIC" \
&& make -j install

# create readline with ncurses
RUN cd /opt/readline/lib \
&& ar -x libreadline.a \
&& ar -x ../../ncurses/lib/libncurses.a \
&& ar cq libreadline.a *.o \
&& rm *.o

ENV PATH /opt/openmpi/bin:/opt/cmake/bin:$PATH

RUN yum -y install libX11-devel.x86_64 libXcomposite-devel.x86_64 vim-enhanced.x86_64
Expand Down
15 changes: 15 additions & 0 deletions packaging/python/README.md
Expand Up @@ -76,3 +76,18 @@ As we haven't setup proper policy yet, do not do this step. For testing purpose
pip3 install twine
python3 -m twine upload --repository-url https://test.pypi.org/legacy/ nrn/wheelhouse/NEURON-*
```

#### Updating neuron_wheel docker image

If you have changed Dockerfile, you can build the new image as:

```
docker build -t neuronsimulator/neuron_wheel .
```

and then push image to hub.docker.com as:

```
docker login --username=<username>
docker push neuronsimulator/neuron_wheel
```
2 changes: 1 addition & 1 deletion packaging/python/build_wheels.bash
Expand Up @@ -60,7 +60,7 @@ build_wheel_linux() {
if [ "$2" == "--bare" ]; then
python setup.py bdist_wheel
else
python setup.py build_ext --cmake-prefix=/opt/ncurses --cmake-defs="NRN_MPI_DYNAMIC=$3" bdist_wheel
python setup.py build_ext --cmake-prefix="/opt/ncurses;/opt/readline" --cmake-defs="NRN_MPI_DYNAMIC=$3" bdist_wheel
fi

if [ "$TRAVIS" = true ] ; then
Expand Down