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

Automatically find Visual Studio #471

Merged
merged 3 commits into from
Aug 22, 2022
Merged

Conversation

neworderofjamie
Copy link
Contributor

This needs two pieces of nastiness:

  • setuptools to configure MSVC environment (same as Brian2)
  • distutils to find msbuild within MSVC environment (due to weirdness of whatever API subprocess.check_call uses underneath)

This means you can use PyGeNN from a standard Python prompt e.g. an Anaconda prompt.

Fixes #466

* Use distutils to find msbuild within MSVC environment
@codecov
Copy link

codecov bot commented Oct 25, 2021

Codecov Report

Merging #471 (a366ce9) into master (5e68ffe) will decrease coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #471      +/-   ##
==========================================
- Coverage   87.03%   87.03%   -0.01%     
==========================================
  Files          84       84              
  Lines       18099    18099              
==========================================
- Hits        15753    15752       -1     
- Misses       2346     2347       +1     
Impacted Files Coverage Δ
src/genn/backends/cuda/optimiser.cc 72.88% <0.00%> (-0.18%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5e68ffe...a366ce9. Read the comment docs.

@neworderofjamie
Copy link
Contributor Author

Further testing suggests this isn't enough as cl.exe needs to be in the path if GeNN decides to do some block-size optimization

@neworderofjamie neworderofjamie removed this from the GeNN 4.6.0 milestone Oct 26, 2021
* no point in doing this for each ``GeNNModel`` - makes sense to have this module-scope
* need to add MSVC stuff to ``os.environ`` so it works with code generator (in process) as well as msbuild (child process)
@neworderofjamie
Copy link
Contributor Author

neworderofjamie commented Aug 1, 2022

Tested on:

  • Windows 10, Python 3.9.12 and VS 2017 15.9
  • Windows 11, Python 3.8.12 and VS 2019 16.11.9
  • Windows 10, Python 3.7.7 and VS 2019 16.8.5

@neworderofjamie neworderofjamie merged commit b5e0c36 into master Aug 22, 2022
@neworderofjamie neworderofjamie added this to the GeNN 4.8.0 milestone Aug 22, 2022
@neworderofjamie neworderofjamie deleted the auto_find_visual_studio branch August 22, 2022 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automatically find Visual Studio on Windows
1 participant