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

Python Builds broken using virtualenv on Windows #12

Open
abnowack opened this issue Jul 23, 2024 · 3 comments
Open

Python Builds broken using virtualenv on Windows #12

abnowack opened this issue Jul 23, 2024 · 3 comments

Comments

@abnowack
Copy link

abnowack commented Jul 23, 2024

-- 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

  • Windows 11
  • python 3.12.4
  • virtualenv environment
  • cmake 3.29.0
  • msvc 19.0

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
Copy link
Author

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
Copy link
Collaborator

jkulesza commented Aug 6, 2024

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
Copy link

yrrepy commented Aug 30, 2024

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants