dejw / vip Goto Github PK
View Code? Open in Web Editor NEWvip is a simple library that makes your Python aware of existing virtualenv underneath.
vip is a simple library that makes your Python aware of existing virtualenv underneath.
When developing on windows, nosetests picks up too many tests (both unix and Windows version).
An integration test is required that will test vip.main
behavior in an end-user maner:
cd some-directory
echo 'some-package` > requirements.txt
...
vip --init
vip pip install
vip pip freeze > pckgs.txt
assert 'some-package' in pckgs.txt
In #10 smart install command is described, and it can use a simple API to list all required dependency files and produce a list of dependencies ready for setup
function in setup.py
.
There are two options:
requirements.txt
file after each (un)install commandvip --update
each time (s)he does thisIn favor of (1) is the reason to keep everything simple, but explicit is better than implicit.
Option (2) is explicit which is good. In addition to (2), requirements.txt.lock
can be created in order to list all used packages (similar how bundler does in Ruby).
--purge
flag should be implemented as it is described in Readme.
Since I used vip only to install (update, or remove) libraries and run something using installed Python, interface can be on even higher level than it is now.
Example:
vip install
- create a virtualenv and update its state - install, update, remove libraries listed in requirements.txt
file
vip test [filename]
- to run tests, using nose, py.test, unittest2 or simply executing python interpreter on given files
vip locate [binary]
- to locate binaries inside the virtualenv underneath
Hey,
Noticed an issue where trying to initialize a new vip environment on Windows would result in the script hanging forever. It appears to be caused by line 59 in the vip/core.py file. Making the following change to that line seems to make it work fine on Windows.
while directory != "/" or head:
to
while (directory != "/" and directory[1:] != ':\\' and directory[1:] != ':/') or head:
Was debating forking and doing a pull request, but I figured this would be easier.
I tried to install some package using vip pip install package
and hit Control-C.
After a while I saw:
Operation cancelled by user
Storing complete log in ~/.pip/pip.log
which means that signal was not propagated correctly.
I found myself in a situation when I had non pip dependency, installed system-wide (pynotify in this example).
In this case I had to run virtualenv --system-site-packages .vip
command manually. In this case it is obvious that some flags should be propagated to virtualenv
command. Maybe all?
It seems that Python 3.x has full child output buffering turned on by default.
Need investigate this.
Install (now --ini
) can be smart enough to install only those requirement files that matches interpreter version, eg:
for Python 2.6 install can install *requirements.txt
, *requirements.2.txt
and *requirements.26.txt
.
In that case one can create a set of requirement files, each for certain interpreter version.
Also install could update environment to reflect changes in those files, e.g uninstall removed dependencies.
Exit status of executed command is not propagated too the shell, e.g. when running vip pep8
and having some errors, status code is still 0
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.