diff options
author | Jan Pokorný <jpokorny@redhat.com> | 2015-01-08 19:09:23 +0100 |
---|---|---|
committer | Jan Pokorný <jpokorny@redhat.com> | 2015-01-09 10:21:49 +0100 |
commit | cfb399035c28b2d463252a4af58c6a1da6bec904 (patch) | |
tree | 294af10082b7753db2fe12abb1a0be95de8048fa | |
parent | acc421d0a929178e00714d0ba2147964f3de3131 (diff) | |
download | clufter-cfb399035c28b2d463252a4af58c6a1da6bec904.tar.gz clufter-cfb399035c28b2d463252a4af58c6a1da6bec904.tar.xz clufter-cfb399035c28b2d463252a4af58c6a1da6bec904.zip |
{run_,}setup: subsequent tweak for "pip install from git"
Also delete run-setup as it has about the same meaning now as running
"python setup.py" fixed part of the command directly.
See also: https://github.com/pypa/pip/pull/2337
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
-rw-r--r-- | __root__/doc/HACKING | 2 | ||||
-rwxr-xr-x | __root__/run-setup | 7 | ||||
-rw-r--r-- | __root__/setup.py | 9 | ||||
l--------- | run-setup | 1 | ||||
l--------- | setup.py | 1 |
5 files changed, 8 insertions, 12 deletions
diff --git a/__root__/doc/HACKING b/__root__/doc/HACKING index 4d6136b..cb13c61 100644 --- a/__root__/doc/HACKING +++ b/__root__/doc/HACKING @@ -2,7 +2,7 @@ Directly consuming the repo --------------------------- After fetching local repo copy: -$ ./run-setup build +$ python setup.py build $ ln -fs __root__/build/ccs_flatten . $ # or ./run-check that should take care on its own and you should be ready to go with: diff --git a/__root__/run-setup b/__root__/run-setup deleted file mode 100755 index 6c839d1..0000000 --- a/__root__/run-setup +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -use_dir="$( - dirname "$(pwd)/$( - ls -l "$(echo "${0}" | sed 's|\./||')" | cut -d'>' -f2 | awk '{print $NF}' - )" -)" -python "${use_dir}/setup.py" "$@" # setup.py now chdir's on its own diff --git a/__root__/setup.py b/__root__/setup.py index 2bd577d..711c9b2 100644 --- a/__root__/setup.py +++ b/__root__/setup.py @@ -15,7 +15,7 @@ except ImportError: from collections import Callable from glob import glob from os import chdir, getcwd, getenv, sep, walk -from os.path import (join as path_join, +from os.path import (join as path_join, realpath as path_real, basename as path_basename, dirname as path_dirname, abspath as path_abs, normpath as path_norm, isabs as path_isabs, isdir as path_isdir, @@ -45,8 +45,9 @@ PREFER_GITHUB = True DEBUG = getenv("SETUPDEBUG") DBGPFX = str(__file__) -here = path_abs(path_dirname(__file__)) -chdir(here) # memoize the trick in run-setup.py + play better with pip install +here = path_abs(path_dirname(path_real(__file__))) +prev_cwd = getcwd() +chdir(here) # make setup.py possess expected CWD + play better with pip install # # Custom machinery extending setuptools/distutils with mechanism @@ -638,3 +639,5 @@ setup( ), }, ) + +chdir(prev_cwd) # restore original CWD (in case we are eval'd or something) diff --git a/run-setup b/run-setup deleted file mode 120000 index 493b40f..0000000 --- a/run-setup +++ /dev/null @@ -1 +0,0 @@ -__root__/run-setup
\ No newline at end of file diff --git a/setup.py b/setup.py new file mode 120000 index 0000000..5a52fad --- /dev/null +++ b/setup.py @@ -0,0 +1 @@ +__root__/setup.py
\ No newline at end of file |