lanl / mcnptools

https://mcnp.lanl.gov
66 stars 16 forks source link

Python Builds broken using virtualenv on Windows #12

Open abnowack opened 2 months ago

abnowack commented 2 months ago

-- Up-to-date: H:/Programs/mcnptools/bin/l3dinfo.exe -- Up-to-date: H:/Programs/mcnptools/bin/l3dscale.exe -- Up-to-date: H:/Programs/mcnptools/bin/mergemctals.exe -- Up-to-date: H:/Programs/mcnptools/bin/mergemeshtals.exe -- Up-to-date: H:/Programs/mcnptools/bin/meshtal2vtk.exe ERROR: Directory 'H:/builds/mcnptools/python' is not installable. Neither 'setup.py' nor 'pyproject.toml' found. -- Up-to-date: H:/Programs/mcnptools/lib/mcnptools.lib -- Up-to-date: H:/Programs/mcnptools/share/cmake/mcnptools/mcnptools-config.cmake -- Up-to-date: H:/Programs/mcnptools/share/cmake/mcnptools/mcnptools-config-release.cmake -- Up-to-date: H:/Programs/mcnptools/share/cmake/mcnptools/mcnptools-config-version.cmake

Following all of the steps listed on the README / manual, everything builds and installs except for the Python bindings. with the above error.

My build system

I'll switch to conda, but since virtualenv is my preferred setup getting that working would be great.

I'd be curious if anyone has this working, or had to do any workarounds.

abnowack commented 2 months ago

It was broken with conda as well, to fix it you need to rename setupRelease.py stored within the python directory of the build folder, to setup.py, before running the cmake install step

jkulesza commented 2 months ago

What were the commands that led to this point? I've been able to build/install into a Python virtual environment enabled with venv using -DPython_FIND_VIRTUALENV=ONLY in the CMake configuration step (and having already activated the virtual environment).

yrrepy commented 1 month ago

thank you Joel, the above solved my issue installing in a Linux Python virtual environment

What were the commands that led to this point? I've been able to build/install into a Python virtual environment enabled with venv using -DPython_FIND_VIRTUALENV=ONLY in the CMake configuration step (and having already activated the virtual environment).