Comments (10)
Hi Benjamin,
Cheers, the csh init file has probably gone out of date as I doubt it's
actually being used.
Re osx, Rez is known not to work on mac yet - there's no major barrier to
this, it's just that the porting work hasn't been done. One problem you
will run into is that osx sed doesn't behave quite the same as bsd sed - I
don't recall the exact details but I know that this stops Rez for working
and will have to be addressed. Any changes you can make that are bsd and
osx compliant are welcome, since that gets us closer to cross platform
support in general.
Thanks
A
On Tuesday, August 13, 2013, bsergean wrote:
Howdy,
Here's a small diff to make it so the init.csh that gets produced by
install.sh is "sour cable". There was 2 straights if that should have been
endif, one extra double quote in there; and the PATH settings is closer to
the one for bash now. I'm still pretty rusty with git so here's a straight
git diff on that file; I'll try to make a proper pull request.[venv] panzani rez$ git diff
diff --git a/init.csh b/init.csh
index 5a36c5d https://github.com/nerdvegas/rez/commit/5a36c5d..fff5231
100644
--- a/init.csh
+++ b/init.csh
@@ -30,20 +30,18 @@ elsewhere rez will publish local packages to (ie those installed with
rez-build -- -- install)
if (! $?REZ_LOCAL_PACKAGES_PATH ) then
setenv REZ_LOCAL_PACKAGES_PATH !REZ_LOCAL_PKGS_PATH!
fi
endif
where rez-egg-install will install python egg packages to
if (! $?REZ_EGG_PACKAGES_PATH" ) then
if (! $?REZ_EGG_PACKAGES_PATH ) then
setenv REZ_EGG_PACKAGES_PATH !REZ_PACKAGES_PATH!
fi
endif
expose rez binaries, replacing existing rez paths if they have been
set already
set clean_path = echo "$PATH" | /usr/bin/tr ':' '\n' | grep -v '^$' |grep -v '!REZ_BASE_PATH!' | /usr/bin/tr '\n' ':'
set rez_path = ":${REZ_PATH}/bin"
set full_path = "$clean_path$rez_path"
setenv PATH $full_path
setenv PATH ${clean_path}:${REZ_PATH}/bin
if (! $?REZ_RELEASE_EDITOR ) then
setenv REZ_RELEASE_EDITOR !REZ_RELEASE_EDITOR!Now when I try to run the rez run hello_world, I get an error about the -p
option of mkdir, which is probably only available with GNU mkdir and not
the BSD one that I'm running on my Mac.Cheers,
- Benjamin
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/23
.
from rez.
Oh good to know about the sed behaving differently.
It feels that you could require that GNU sed is used on the Mac, I've installed the GNU one and will figure out how to make rez pick that one (There a package system on the Mac, Homebrew that makes it a breeze to install tools). But ideally I would say that if most tools are rewritten in pure python the dependency on sed can be lifted somewhat.
panzani rez$ brew install gnu-sed
==> Downloading http://ftpmirror.gnu.org/sed/sed-4.2.1.tar.bz2
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/gnu-sed/4.2.1 --program-prefix=g
==> make install
/usr/local/Cellar/gnu-sed/4.2.1: 7 files, 308K, built in 34 seconds
panzani rez$ rehash
panzani rez$ /usr/local/bin/gsed
Usage: /usr/local/bin/gsed [OPTION]... {script-only-if-no-other-script} [input-file]...
from rez.
Also, I'm gonna make a small page with all the tools I needed (I got cmake from Homebrew for example) to get rez up and running; I'll keep you posted.
from rez.
Yes I think there are probably a lot of instances where sed/bash is being
used, where python could be doing the work instead. Certainly priority
should be on moving as much code to python as possible.
Re Rez having a bsd-sed requirement, if at all possible we should avoid
this, since its yet another thing to install in order for Rez to work. I'd
like to get the Rez installation process a lot simpler than it is now. In
cases where regex in bash cannot be avoided, it still might be possible to
change the specific regex, or use some combination of sed with other tools,
to avoid the direct dependency on bsd-sed... that would be my preferred
option. So part of this would would be determining when and how the sed
implementations differ, then seeing how we can avoid these cases.
Thx
A
On Wednesday, August 14, 2013, bsergean wrote:
Also, I'm gonna make a small page with all the tools I needed (I got cmake
from Homebrew for example) to get rez up and running; I'll keep you posted.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/23#issuecomment-22571610
.
from rez.
I think there used to be a way to switch some core utils tools to a POSIX
behavior by setting some env var.
I have no idea where the behavior are different, but maybe as you say it's
just a simple tweak to the way
sed is called right now so it will work on Mac + Linux.
BTW I was able to run the hello_world sample case through rez-env (yeah !),
but that was by hacking at the
mktemp incantation which is not right (the way to call the one on the Mac
differs a lot from the one on Linux).
I was thinking about creating a rez-mktemp python script which
would be portable. What do you think ? (it should be very small, and would
support the Linux way of calling mktemp)
so rez-env can be left mostly as is for now.
- Benjamin
On Tue, Aug 13, 2013 at 5:17 PM, allan johns [email protected]:
Yes I think there are probably a lot of instances where sed/bash is being
used, where python could be doing the work instead. Certainly priority
should be on moving as much code to python as possible.Re Rez having a bsd-sed requirement, if at all possible we should avoid
this, since its yet another thing to install in order for Rez to work. I'd
like to get the Rez installation process a lot simpler than it is now. In
cases where regex in bash cannot be avoided, it still might be possible to
change the specific regex, or use some combination of sed with other
tools,
to avoid the direct dependency on bsd-sed... that would be my preferred
option. So part of this would would be determining when and how the sed
implementations differ, then seeing how we can avoid these cases.Thx
AOn Wednesday, August 14, 2013, bsergean wrote:
Also, I'm gonna make a small page with all the tools I needed (I got
cmake
from Homebrew for example) to get rez up and running; I'll keep you
posted.—
Reply to this email directly or view it on GitHub<
https://github.com/nerdvegas/rez/issues/23#issuecomment-22571610>
.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/23#issuecomment-22607317
.
from rez.
Some work on an osx port was actually started a few years ago, but the
studio that was being done at went out of business and the work was lost.
One thing the developer on the task started doing, was putting OS-specific
tools into subdirectories (eg bin/sys/linux, bin/sys/darwin), then just
appending the relevant sys bin dir to path inside of rez-env. So for eg,
your rez_mktemp tool would go there.
Probably I've already mentioned too, but a bunch of work needs to be done
cleaning up all the supporting code - moving as much stuff into python as
possible, and consolidating all the separate tools into a single 'Rez' tool
with subcommands. Bear in mind we'd need to leave backwards compatible
tools behind also , that just fwd onto the new stuff... Eg rez-xxx would
just fwd to 'rez xxx'.
Hope that makes sense.
Cheers
A
On Wednesday, August 14, 2013, bsergean wrote:
I think there used to be a way to switch some core utils tools to a POSIX
behavior by setting some env var.
I have no idea where the behavior are different, but maybe as you say it's
just a simple tweak to the way
sed is called right now so it will work on Mac + Linux.BTW I was able to run the hello_world sample case through rez-env (yeah
!),
but that was by hacking at the
mktemp incantation which is not right (the way to call the one on the Mac
differs a lot from the one on Linux).I was thinking about creating a rez-mktemp python script which
would be portable. What do you think ? (it should be very small, and would
support the Linux way of calling mktemp)
so rez-env can be left mostly as is for now.
- Benjamin
On Tue, Aug 13, 2013 at 5:17 PM, allan johns <[email protected]<javascript:_e({}, 'cvml', '[email protected]');>>wrote:
Yes I think there are probably a lot of instances where sed/bash is
being
used, where python could be doing the work instead. Certainly priority
should be on moving as much code to python as possible.Re Rez having a bsd-sed requirement, if at all possible we should avoid
this, since its yet another thing to install in order for Rez to work.
I'd
like to get the Rez installation process a lot simpler than it is now.
In
cases where regex in bash cannot be avoided, it still might be possible
to
change the specific regex, or use some combination of sed with other
tools,
to avoid the direct dependency on bsd-sed... that would be my preferred
option. So part of this would would be determining when and how the sed
implementations differ, then seeing how we can avoid these cases.Thx
AOn Wednesday, August 14, 2013, bsergean wrote:
Also, I'm gonna make a small page with all the tools I needed (I got
cmake
from Homebrew for example) to get rez up and running; I'll keep you
posted.—
Reply to this email directly or view it on GitHub<
https://github.com/nerdvegas/rez/issues/23#issuecomment-22571610>
.—
Reply to this email directly or view it on GitHub<
https://github.com/nerdvegas/rez/issues/23#issuecomment-22607317>
.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/23#issuecomment-22610716
.
from rez.
Hey Alan,
Here's a suggestion for the mktemp pb ; in par with the call to get a uuid in bin/rez-make-yaml
It works nicely on my Mac.
diff --git a/bin/rez-env b/bin/rez-env
index ae96d18..bed738c 100755
--- a/bin/rez-env
+++ b/bin/rez-env
@@ -56,7 +56,7 @@ tmpdir=$_REZ_ENV_OPT_TMPDIR
##############################################################################
if [ "$autowrappers" != "" ]; then
if [ "$tmpdir" == "" ]; then
- tmpdir=`mktemp -d`
+ tmpdir=`python -c 'import tempfile ; print tempfile.mkdtemp()'`
fi
export REZ_TMP_DIR=$tmpdir
rez-env-autowrappers $tmpdir $*
@@ -110,7 +110,7 @@ tmpd=$tmpdir
if [ "$tmpd" == "" ]; then
tmpd="/tmp"
fi
-tmpf=`mktemp -p $tmpd .rez-context.XXXXXXXXXX`
+tmpf=`python -c 'import tempfile, sys ; print tempfile.mktemp(suffix="", prefix=".rez-context.", dir=sys.argv[1])' $tmpd`
tmpf2=$tmpf".source"
tmpf3=$tmpf".dot"
diff --git a/bin/rez-diff b/bin/rez-diff
index dfe11a2..e5b9cab 100755
--- a/bin/rez-diff
+++ b/bin/rez-diff
@@ -9,7 +9,7 @@ inbrowser=`echo $* | grep -w '\-\-view\-html'`
if [ "$inbrowser" == "" ]; then
rez-diff_.py "$@"
else
- tmpf=`mktemp`
+ tmpf=`python -c 'import tempfile ; print tempfile.mktemp()'`
rez-diff_.py "$@" > $tmpf
firefox $tmpf
fi
from rez.
Got it, yes looks good. Although I think it'd be cleaner to have a
bin/sys/common subdir to match bin/sys/[OS], and put the tmpfile, uuid
generation stuff in there as python hashbanged scripts, rather than
invoking python directly like above (and possibly several times over in
different places!).
A
On Wed, Aug 14, 2013 at 2:44 PM, bsergean [email protected] wrote:
Hey Alan,
Here's a suggestion for the mktemp pb ; in par with the call to get a uuid
in bin/rez-make-yaml
It works nicely on my Mac.diff --git a/bin/rez-env b/bin/rez-env
index ae96d18..bed738c 100755
--- a/bin/rez-env
+++ b/bin/rez-env
@@ -56,7 +56,7 @@ tmpdir=$_REZ_ENV_OPT_TMPDIR
##############################################################################
if [ "$autowrappers" != "" ]; then
if [ "$tmpdir" == "" ]; then
tmpdir=`mktemp -d`
tmpdir=`python -c 'import tempfile ; print tempfile.mkdtemp()'` fi export REZ_TMP_DIR=$tmpdir
rez-env-autowrappers
$tmpdir $ *
@@ -110,7 +110,7 @@ tmpd=$tmpdir
if [ "$tmpd" == "" ]; then
tmpd="/tmp"
fi
-tmpf=mktemp -p $tmpd .rez-context.XXXXXXXXXX
+tmpf=`python -c 'import tempfile, sys ; print tempfile.mktemp(suffix="", prefix=".rez-context.", dir=sys.argv[1])' $tmpdtmpf2=$tmpf".source"
tmpf3=$tmpf".dot"—
Reply to this email directly or view it on GitHubhttps://github.com//issues/23#issuecomment-22614750
.
from rez.
OK, I had not seen this comment. I'll see how to use the bin/sys/common location to add utilities.
from rez.
Works nicely in the osx branch, closing.
from rez.
Related Issues (20)
- Running command after "rez-env" produces different result same command being run via "rez-env --" HOT 2
- Indirect Cycle Causes Conflict Graph to Hang Indefinitely HOT 3
- Better default for `pathed_env_vars` HOT 7
- beginner help example_package / rez-build -i error HOT 1
- Show inheritance in Python API docs HOT 5
- package_filter parameter on ResolvedContext class shows incorrect expected type HOT 1
- Automatically format the code base
- TSC Meeting 2013-11-16
- Add update functionality to rez-suite HOT 5
- Rez Suites load implicit packages from context
- Remove eclipse from default CMake variables
- Benchmark fails to run because install.py is python 3 only
- Benchmarks on release fail due to missing token
- Slack notification workflow is not working HOT 1
- rez 2.114.0 produces an error if a custom configuration file is used with a deprecated key HOT 4
- release using os.link causing issue on Windows & ReFS HOT 1
- Issue with bash aliases and variants HOT 2
- Husk arguments `<F4>` not being passed correctly
- Add a native license package attribute HOT 1
- Install fails on MacOS when creating venv HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rez.