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 BuildPythonAPI cleaning and success message #2348

Merged

Conversation

jeffreykxiao
Copy link

@jeffreykxiao jeffreykxiao commented Jan 10, 2020

Description

BuildPythonAPI.bat was broken because it was expecting %PYTHON_LIB_PATH% to have a trailing slash, which it was missing.

Fixes #2339

Behavior prior to this change:

  • make clean does not clean the intermediate files for building PythonAPI
  • make PythonAPI displays the wrong path for the build result

Behavior with this change:

  • make clean properly cleans up the intermediate files located in PythonAPI/carla/build, PythonAPI/carla/dist, and PythonAPI/carla/source/carla.egg-info
  • make PythonAPI reports the correct location of the build result

Where has this been tested?

  • Platform(s): Windows 10 x64
  • Python version(s): ... 3.6
  • Unreal Engine version(s): ... 4.22.3

Possible Drawbacks

Now that make clean actually attempts to clean up the intermediate build artifacts, in case they are held by some other process, make clean may fail to clean up some of the directories. This is bog standard for Windows so as long as people are paying attention to the output of make clean all should be well.

Existing issue: code does not check for existing installs, so we can still end up with multiple egg files in dist if we do not make clean


This change is Reviewable

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@update-docs
Copy link

update-docs bot commented Jan 10, 2020

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would update our CHANGELOG.md based on your changes.

@veliona
Copy link

veliona commented Jan 10, 2020

Hi @jeffreykxiao !
Just facing this problem, thanks for your PR 👍
This fixes the displayed path, however, doesn't fix the fact that I have an error:
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64\\link.exe' failed with exit status 1120

And I am still missing dist directory with .egg file..
Are you able to give a hand on this?

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Co-Authored-By: Gökhan Barış Aker <gokhanbarisaker@gmail.com>
@jeffreykxiao
Copy link
Author

@veliona

error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64\\link.exe' failed with exit status 1120

And I am still missing dist directory with .egg file..

That problem is unrelated to this PR (which only attempts to fix a message + make clean functionality), so I think it would be best to create a new issue. Additionally when doing so, adding some more context would be great! Also don't forget that the Discord server is available to help in real time.

Copy link
Contributor

@marcgpuig marcgpuig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r2.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @bernatx and @gokhanbarisaker)

@marcgpuig
Copy link
Contributor

@jeffreykxiao Thanks for your PR.
Looks good to me, I've not tested it since I have no Windows access right now, but I hope @bernatx can test it in his machine.
Cheers!

Copy link
Author

@jeffreykxiao jeffreykxiao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @bernatx and @gokhanbarisaker)


Util/BuildTools/BuildPythonAPI.bat, line 156 at r1 (raw file):

Previously, jeffreykxiao (Jeff Xiao) wrote…

Hm, it seems I did. IDK if the whole repo attempts to maintain posix compliance but nonetheless unnecessary changes are bad so I will gladly accept this

(accepted change on github, but forgot to resolve on reviewable)

@jeffreykxiao
Copy link
Author

Hi @bernatx, just wanted to ping you real quick about this one since it's a fairly easy one just waiting for your testing / approval :)

Copy link
Contributor

@bernatx bernatx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, thanks for your effort.

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @bernatx and @gokhanbarisaker)

Copy link
Contributor

@bernatx bernatx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @gokhanbarisaker)

@bernatx bernatx added this to the 0.9.8 milestone Jan 29, 2020
Copy link
Contributor

@bernatx bernatx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dismissed @gokhanbarisaker from a discussion.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@bernatx bernatx merged commit cb9a48e into carla-simulator:master Feb 3, 2020
@filippogandolfi
Copy link

Hi all, I have what it looks like the same problem as @veliona .

This fixes the displayed path, however, doesn't fix the fact that I have an error:
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64\\link.exe' failed with exit status 1120

And I am still missing dist directory with .egg file..
Are you able to give a hand on this?

However I have the new version with the code reviewed by @jeffreykxiao and I don't get why I have this problem.
Someone has the same problem?

@EchoYJJ
Copy link

EchoYJJ commented Apr 4, 2021

Hi all, I have what it looks like the same problem as @veliona .

This fixes the displayed path, however, doesn't fix the fact that I have an error:
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64\\link.exe' failed with exit status 1120
And I am still missing dist directory with .egg file..
Are you able to give a hand on this?

However I have the new version with the code reviewed by @jeffreykxiao and I don't get why I have this problem.
Someone has the same problem?

Hi, I also encounter the same issue, have you solved it now?

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

Successfully merging this pull request may close these issues.

CARLA 0.9.7 does not generate a python library on Windows 10
7 participants