uniphil / venvgit2 Goto Github PK
View Code? Open in Web Editor NEWEasily install libgit2 and pygit2 in a virtualenv
Easily install libgit2 and pygit2 in a virtualenv
$ python3 --version
Python 3.7.3
pip-requirements.txt
pytest==4.6.3
selenium==3.141.0
venvgit2==0.28.1
with my pip-requirement.txt file
virtualenv venv
. venv/bin/activate
(venv) pip install -r pip-requirements.txt
and I got the following error:
Collecting pycparser (from cffi>=0.8.6->venvgit2==0.28.1->-r pip-requirements.txt (line 3))
Building wheels for collected packages: venvgit2
Building wheel for venvgit2 (setup.py) ... error
ERROR: Complete output from command /Users/congxin/Workspace/gitenter/selenium-test/venv/bin/python3.7 -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/kp/fz7j3bln4m11rc197xrj4dvc0000gq/T/pip-install-14_3rqfg/venvgit2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/kp/fz7j3bln4m11rc197xrj4dvc0000gq/T/pip-wheel-hlmaqr8b --python-tag cp37:
ERROR: running bdist_wheel
running build
installing to build/bdist.macosx-10.13-x86_64/wheel
running install
Looking for cmake...
/usr/local/bin/cmake
Looking for python dev files...
Checking .pth file support in build/bdist.macosx-10.13-x86_64/wheel/
/Users/congxin/Workspace/gitenter/selenium-test/venv/bin/python3.7 -E -c pass
TEST FAILED: build/bdist.macosx-10.13-x86_64/wheel/ does NOT support .pth files
error: bad install directory or PYTHONPATH
You are attempting to install a package to a directory that is not
on PYTHONPATH and which Python does not read ".pth" files from. The
installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
build/bdist.macosx-10.13-x86_64/wheel/
and your PYTHONPATH environment variable currently contains:
''
Here are some of your options for correcting the problem:
* You can choose a different installation directory, i.e., one that is
on PYTHONPATH or supports .pth files
* You can add the installation directory to the PYTHONPATH environment
variable. (It must then also be on PYTHONPATH whenever you run
Python and want to use the package(s) you are installing.)
* You can set up the installation directory to support ".pth" files by
using one of the approaches described here:
https://setuptools.readthedocs.io/en/latest/easy_install.html#custom-installation-locations
Please make the appropriate changes for your system and try again.
----------------------------------------
ERROR: Failed building wheel for venvgit2
Running setup.py clean for venvgit2
Failed to build venvgit2
However, it seems actual usage of it has no problem (I can successfully import pygit2
and use it). Not sure if that's because I installed libgit2
in my local machine in a separated way?
Should be able to automate some of the upgrading by having a build that runs whenever there is a new version of pygit2 / libgit2. I will hopefully get to this in a couple months. Putting this here to remind myself.
It would be great if you could update pygit2, libgit2 and upload a new release of venvgit2 to pypi :-)
If you run pip install venvgit2==0.21.libgitmaint.0
with pip 6.0.6 the following error is produced:
Collecting venvgit2==0.21.libgitmaint.0
Using cached venvgit2-0.21.libgitmaint.0.tar.gz
/home/dblack/myenv/lib/python3.4/site-packages/setuptools/dist.py:293: UserWarning: The version specified ('0.21.libgitmaint.0') is an invalid version, this may not work as expected with newer versions of setuptools, pip, and PyPI. Please see PEP 440 for more details.
"details." % self.metadata.version
Collecting cffi>=0.8.6 (from venvgit2==0.21.libgitmaint.0)
Using cached cffi-0.8.6.tar.gz
Hey, there is a patch I would like to use, that exists on the libgit2 maint/v0.21 branch. How can I use that with venvgit2?
Cheers!
Here is my failing test: https://circleci.com/gh/gitenter/gitenter/975?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link
Error:
Failed building wheel for venvgit2
Running setup.py clean for venvgit2
Running setup.py bdist_wheel for pycparser ... -� �\� �|� �done
Stored in directory: /home/circleci/.cache/pip/wheels/f2/9a/90/de94f8556265ddc9d9c8b271b0f63e57b26fb1d67a45564511
Successfully built pycparser
Failed to build venvgit2
Installing collected packages: attrs, zipp, importlib-metadata, pluggy, pyparsing, six, packaging, py, more-itertools, wcwidth, atomicwrites, pytest, urllib3, selenium, pycparser, cffi, venvgit2
Exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/local/lib/python3.6/site-packages/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/usr/local/lib/python3.6/site-packages/pip/req/req_set.py", line 784, in install
**kwargs
File "/usr/local/lib/python3.6/site-packages/pip/req/req_install.py", line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/usr/local/lib/python3.6/site-packages/pip/req/req_install.py", line 1064, in move_wheel_files
isolated=self.isolated,
File "/usr/local/lib/python3.6/site-packages/pip/wheel.py", line 345, in move_wheel_files
clobber(source, lib_dir, True)
File "/usr/local/lib/python3.6/site-packages/pip/wheel.py", line 316, in clobber
ensure_dir(destdir)
File "/usr/local/lib/python3.6/site-packages/pip/utils/__init__.py", line 83, in ensure_dir
os.makedirs(path)
File "/usr/local/lib/python3.6/os.py", line 220, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.6/site-packages/attr'
execution:
Version 0.21.5 on pypi lacks libgit2 and pygit2 files ... so package installation fails.
cc @uniphil
pygit2 0.21.2 has been released please update pygit2 and libgit2 accordingly :-)
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.