[Windows] Use console_scripts to generate portable wstool. #128
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really cool, is this a new feature?
src/wstool/wstool_cli.py
Outdated
sys.exit(wstool_main(sys.argv)) | ||
except ImportError as exc: | ||
sys.exit("ERROR: Cannot find required rosinstall library version, \ | ||
check your installation (also of vcstools) is up-to-date. One frequent cause \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this spacing is going to look really weird on the print-out, right?
Also, more pythonic ways of writing multiline strings are:
sys.exit("Part of a string "
"and the rest of it.")
Or
sys.exit("""\
Part of a string \
and the rest of it.""")
Note the spacing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
@@ -110,7 +110,9 @@ def run(self): | |||
cmdclass=cmdclass, | |||
# rosinstall dependency to be kept in order not to break ros hydro install instructions | |||
install_requires=install_requires, | |||
scripts=["scripts/wstool"], | |||
entry_points = { | |||
'console_scripts': ['wstool=wstool.wstool_cli:main'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, is this a new feature? 💃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This console_scripts seems to be a feature for a while (https://python-packaging.readthedocs.io/en/latest/command-line-scripts.html), but since wstool mostly was used in the system supporting shebang so it probably doesn't matter to generate the console program stub.
However on Windows, it doesn't magically recognize it is a python script so people usually need to do "python wstool" to run it. With this console_scripts help, now on Windows you can also do "wstool". :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙌
For consistencies sake, similar changes could be made to rosws and rosinstall. |
@dirk-thomas @wjwwood ping. Is it something you can help review (or get it merged)? 😃 |
@seanyen I am not a maintainer of this package / repo. If you want to move forward without these changes being merged and released you could also use vcstool instead. It does accept the same input file format as this tool and can be used as a drop-in replacement. In ROS 2 we only use |
@seanyen I don't have time to help right now. I took care of these repositories for many years when no one else would, but now I no longer use these tools regularly and do not have time to continue to help with it. Hopefully someone who uses the tools and has some free time will step up to help maintain.
That doesn't really help @seanyen get this pull request merged, and without updating all the ROS 1 installation instructions is probably not a very attractive solution.
It's not a drop in replacement, wstool has several features that It might work for a drop-in replacement in the ROS 1 install instructions, but it's not a complete replacement.
We never did that to avoid disruption in ROS 1 and because we never reached feature parity with |
While it doesn't help with these patches it will allow to provide a working set of instructions for Windows builds. I would assume that the instructions for Windows will need at least some level of difference to the existing instructions targeting Linux / macOS so I don't think it needs to use the same commands for every step. |
@wjwwood: what is the designated OSRF process for enabling the community to make releases for tools that OSRF cannot maintain due to other priorities? Teach a man to fish. |
There's two binary artifacts of a release, pypi (pip) and deb's (hosted on packages.ros.org). The latter is difficult to give access to just anyone. I can give permissions for pypi, and help with pushing the debs (takes minutes each release). What I don't have time for is testing the release candidate, writing changelogs, tagging the release, notifying the community/users of breaking changes if needed, etc... If anyone wants to do that part of it, then they just need to ask and I'll get them setup. I think it will be in much better hands with someone who uses it regularly and has enough bandwidth care for it. |
@wjwwood , I am already maintainer in but not
If you add me I may find time to do releases to there. |
@tkruse I don't see your pypi username (might be a weird thing since pypi has been through a few migrations), can you confirm it to me? I'll add you on all of them. |
Please exclude https://pypi.org/project/rosinstall-generator/ from the list of to-be-added projects. I am actively maintaining that repo and would like to continue doing the releases. |
Sorry, I meant rosinstall_shellcompletion not rosinstall_generator. I assume it is released from https://github.com/vcstools/rosinstall_tab_completion Userne is https://pypi.org/user/ThibaultKruse/ |
I added you on the ones you asked for originally, but I'm not a maintainer on https://pypi.org/project/rosinstall_shellcompletion/, so @tfoote or @dirk-thomas will have to add you. |
@tkruse Just want to check if anything I can help expedite the Windows related fixes for |
@seanyen : I will make a test release on testpypi once I am ready to release, at the time I shall ping you here again so you can verify the test release |
8fc938c
to
6b06c4f
Compare
@tkruse Happy new year. Just want to ping to see if we can move this forward. |
I have no plan of working on this.
…On Thu, Jan 16, 2020, 03:48 Sean Yen ***@***.***> wrote:
@tkruse <https://github.com/tkruse> Happy new year. Just want to ping to
see if we can move this forward.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#128?email_source=notifications&email_token=AALUK7GUCE7VZIOHTHJBF4TQ55K6LA5CNFSM4GTVGRI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJBLTKQ#issuecomment-574798250>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALUK7FV4WM2P7S2NCXS273Q55K6LANCNFSM4GTVGRIQ>
.
|
Closing since the repository is about to be archived: see #154. |
Use console_scripts to generate portable wstool.
This is verified by https://aka.ms/ros project.