Because aliases don’t work on windows (unless I missed something)
Aliases should work, what issues have you been experiencing? On Windows, “alias” means “doskey”.
So I was wondering I missed something with rez release.
I also had trouble with this command at first, the name is a little misleading.
rez build --install means hosting it in your local development directory, e.g. ~/packages rez release is unrelated to thatIn a nutshell, rez release is an integration with git and Git “tags” to automate the process of building a package and creating a Git tag. You can use that as a means of “releasing” packages, but unless you leverage Git and tags for your packages, then it doesn’t apply to you. Other options are e.g. rez build --install --release to “install” onto your REZ_RELEASE_PACKAGES_PATH like rez release does, and another is rez build --install --prefix /some/central/location to specify a destination yourself.
In either case, rez release isn’t going to help you with arranging your hierarchy. For that, it sounds like what you want is something like..
package_a
|_ package.py
|_ rezbuild.py
|_ python
|_ script.py
|_bin
|_ do_it.bat
|_ do_it
And then on build, you pick the right bin/do_it file based on platform.
if os.name == "nt":
shutil.copyfile("bin/do_it.bat", os.path.join(build_dir, "bin"))
else:
shutil.copyfile("bin/do_it", os.path.join(build_dir, "bin"))
--
You received this message because you are subscribed to the Google Groups "rez-config" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rez-config+...@googlegroups.com.
To post to this group, send email to rez-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/rez-config.
To view this discussion on the web visit https://groups.google.com/d/msgid/rez-config/CAAm-xYZJsv%2B5PPzWahuVqhKAsLz51N-BPBWFyMYgik2FR9BEfQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/rez-config/CAFRtmOB0dAnaT5s2cwPo1OOf6eztfje-jgp7GiNzkU9ZqiVhug%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Ah, I think I see what you mean. You want the Windows-specific parts (in this case, the do_it.bat and do_it executable) separate from the cross-platform parts (in this case script.py), so that each variant can share the same Python code, is that right?
I understand that the above example is a minimal replica of the actual problem, but if that’s all there is, then have you considered not using a variant?
For example, this package is similar to your example, and builds for both Windows, Linux and MacOS, without using variants.
To Windows, the executable is install.bat whereas for Linux/MacOS the executable is the install file. Because Linux/MacOS doesn’t care about the .bat file, and because Windows doesn’t care about the non-.bat files, they can happily co-exist in the same package and same resolved environment.
To view this discussion on the web visit https://groups.google.com/d/msgid/rez-config/CAAm-xYZikCxzm2bF1UdfGNk%3DCp3tgxtUUS6Npz_X4BDfm4gWsQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rez-config/CAFRtmOD_2aNaYiw%3D%3D8pzQKkOfWKpcnW2LcC5BbiW0zCkQqBNGQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/rez-config/CAAm-xYb1uOnk93aC0pfGZmsi5uUQQtf9JURMjZkJxGK4VNBw5Q%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rez-config/CAFRtmOAhVgmKAHPXUaFs0gqRBZzF5rrfuCGdku%2BnZBfpd0Efuw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
That was one of my gripes with rez pip as well, which is one of things solved in the rez-pipz project linked to above.
$ git clone https://github.com/mottosso/rez-pipz.git
$ cd rez-pipz
$ rez build --install
$ rez env pipz -- install six
# Cross-platform Rez package created
To view this discussion on the web visit https://groups.google.com/d/msgid/rez-config/CAAm-xYbwyv9Fh%3D%2B8Frbv6T%2BEL27b2-T0kf5dbKoWmDir_im1BQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rez-config/CAFRtmODwJONnuSOxGDXhm5SLaj1sngDHcg_rAG_7bJ-9F3Ce1Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/rez-config/CAAm-xYaXW%2BXRonKinrKdQce60mybsoFdHHnmhSAeakzk6uB7rg%40mail.gmail.com.