GithubHelp home page GithubHelp logo

Comments (6)

xolox avatar xolox commented on August 30, 2024 1

I just published pip-accel version 0.43 to GitHub and PyPI. The new version supports being executed using the syntax python -m pip_accel .... While adding a simple test for this mode of execution I noticed that this isn't supported on Python 2.6 due to a regression in Python 2.6 (one workaround is to run python -m pip_accel.__main__ ...). I hope this helps!

from pip-accel.

xolox avatar xolox commented on August 30, 2024

Hi and thanks for the feedback. I've never consciously enabled this mode of operation in any of my Python projects. What's the advantage(s) you see in enabling this? Currently you can achieve the same effect (IIUC) using a command line like the following:

python $(which pip-accel) install -r requirements.txt

But to be honest I don't see why any of this is preferable over just running the pip-accel console script entry point which is provided specifically for this purpose :-).

from pip-accel.

elena-lilac avatar elena-lilac commented on August 30, 2024

python $(which pip-accel) install -r requirements.txt does't work on Win. I'm looking for the same sintax for linux/mac/win.

from pip-accel.

HPotter avatar HPotter commented on August 30, 2024

Hi @xolox!

Our case is not-so-simple: we have cross-platform script for virtualenv creation. It has 3 steps:

  • create virtualenv
  • install pip-accel using pip
  • install some packages using pip-accel

Script is written on python, and we use subprocess to call virtualenv, pip and pip-accel scripts.
To call, e.g. pip-accel, we need to know its binary name: pip-accel on linux & os x and pip-accel.exe on windows. (Or we can use shell=True, but subprocess docs warn that it can be a security hazard)

So we have two "magic" lines in code:

pip_exec = 'pip.exe' if is_win else 'pip'
pip_accel_exec = 'pip-accel.exe' if is_win else 'pip-accel'

Pip supports python -m pip install pip-accel syntax, and we wanted to use pip-accel the same way in order to replace two magic lines with one python_exec = 'python.exe' if is_win else 'python'.

Or, maybe, we're doing everything wrong, and there is a solution that uses no "magic" at all =)

from pip-accel.

xolox avatar xolox commented on August 30, 2024

@HPotter wrote:

Or, maybe, we're doing everything wrong, and there is a solution that uses no "magic" at all =)

No this definitely sounds like a valid and reasonable use case, I'm working on enabling python -m pip_accel ... right now. Stay tuned! :-)

from pip-accel.

HPotter avatar HPotter commented on August 30, 2024

Oh, great, thank you! That was insanely fast ;)

from pip-accel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.