diff --git a/README.rst b/README.rst index f19c12e..d1f7701 100644 --- a/README.rst +++ b/README.rst @@ -70,6 +70,6 @@ If you *do* want to reinstall an environment, this is also possible:: In addition, if if is possible to use ``enw`` to install a suite of standard packages. By including a ``-i`` flag, ``enw`` will look for the file -``.enw`` recursivly in the current directory and bellow and install its content -using ``pip install -r``, using the newly installed virtual environment. Like -``autoenv`` it will install in order from lowest directories to the highest. +``.enw`` recursivly in the current directory and bellow it (much like +``autoenv``) and install its content using ``pip install -r``, using the newly +installed virtual environment. diff --git a/enw/parser.py b/enw/parser.py index d147464..4f241e8 100644 --- a/enw/parser.py +++ b/enw/parser.py @@ -43,12 +43,12 @@ def adjust_autoenv(pypath): def pip_install(pypath): """ - Pip install default programs from `.enwrc` file if it exists. + Pip install default programs from `.enw` file if it exists. Args: pypath (str) : path to the python virtual enviroment folder. """ - pippath = os.path.join(pypath, "bin", "pip") + pippath = os.path.abspath(os.path.join(pypath, "bin", "pip")) cmd = "%s install -U pip" % pippath print(cmd) @@ -72,7 +72,7 @@ def pip_install(pypath): with open(rcfile) as src: lines = src.readlines() for line in lines: - cmd = "%s install -r %s" % (pippath, line) + cmd = "%s install %s" % (pippath, line) print(cmd) os.system(cmd) @@ -86,13 +86,8 @@ def run_args(version=3, force=False, install_pip=False, **kwargs): Args: version (int, float) : The python version number to one decimal. force (bool) : Override old python enviroment if exist. - install_pip (bool) : Install programs with pip from `~/.enwrc`. + install_pip (bool) : Install programs with pip from `~/.enw`. """ - # run outside env: - if os.environ.get("VIRTUAL_ENV", ""): - os.system("deactivate && " + " ".join(sys.argv)) - sys.exit(0) - if version == int(version): version = "%d" % version else: @@ -125,7 +120,7 @@ def set_args(parser): ) parser.add_argument( "-i", "--install-pip", action="store_true", - help="install packages from `~/.enwrc`" + help="install packages from `~/.enw`" ) parser.add_argument( "version", type=float, nargs="?", default=3, diff --git a/setup.py b/setup.py index a0a8612..4a21906 100755 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setup( name="enw", - version="0.2", + version="0.4", packages=find_packages(), entry_points={ 'console_scripts': [