Giter VIP home page Giter VIP logo

hitchpython's Introduction

hitchpython's People

Contributors

crdoconnor avatar

Stargazers

 avatar

Watchers

 avatar  avatar

hitchpython's Issues

Add sanity checking for the base environment of the virtualenv

Issue reported here: hitchtest/hitch#8

If the virtualenv is kept and the base .hitchpkg python environment disappears or becomes inaccessible somehow, the virtualenv will spew some really weird and nasty errors like this:

Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Traceback (most recent call last):
  File "/home/django/django-remindme/pyv2.7.10/bin/pip", line 7, in <module>
    from pip import main
  File "/home/django/django-remindme/pyv2.7.10/lib/python2.7/site-packages/pip/__init__.py", line     2, in <module>
    from __future__ import absolute_import
ImportError: No module named __future__

This problem should be detected and ideally, silently rectified. Alternatively it could throw a more meaningful exception and ask the user to take corrective action if there is no way to code an identification of the exact problem.

Can't import `pyexpat` module

I'm try to run my first test, and I get a built error that seems related to pyexpat. It's my first run so I don't really know what I'm doing :)

I'm running on OS X 10.10, and use pyenv on my system.

$ hitch test register-and-log-in.test --settings tdd.settings
RUNNING TEST Sign up and log in
Downloading Python-2.7.10.tgz...
-> https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz
Installing Python-2.7.10...
patching file ./Lib/site.py
WARNING: The Python readline extension was not compiled. Missing the GNU readline lib?
Installing pip from https://bootstrap.pypa.io/get-pip.py...
error: failed to install pip via get-pip.py

BUILD FAILED (OS X 10.10.5 using python-build 20151028)

Inspect or clean up the working tree at /var/folders/6q/md1975bn17152mx0nr2zc20c0000gp/T/python-build.20160114104627.11021
Results logged to /var/folders/6q/md1975bn17152mx0nr2zc20c0000gp/T/python-build.20160114104627.11021.log

Last 10 log lines:
    info = _mac_ver_xml()
  File "/Users/flavio/.hitchpkg/python2.7.10/lib/python2.7/platform.py", line 786, in _mac_ver_xml
    pl = plistlib.readPlist(fn)
  File "/Users/flavio/.hitchpkg/python2.7.10/lib/python2.7/plistlib.py", line 78, in readPlist
    rootObject = p.parse(pathOrFile)
  File "/Users/flavio/.hitchpkg/python2.7.10/lib/python2.7/plistlib.py", line 401, in parse
    from xml.parsers.expat import ParserCreate
  File "/Users/flavio/.hitchpkg/python2.7.10/lib/python2.7/xml/parsers/expat.py", line 4, in <module>
    from pyexpat import *
ImportError: No module named pyexpat
Python 3.5.0 (default, Sep 23 2015, 04:42:00)
Type "copyright", "credits" or "license" for more information.

IPython 4.0.1 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.


Exception occurred in "Sign up and log in" setup
    /Users/flavio/working_copies/joy/tests/register-and-log-in.test


[0]: function 'set_up'   ( self.stacktrace[0].ipython() )
  /Users/flavio/working_copies/joy/tests/engine.py

    22 :             python_version=self.settings['python_version']
    23 :         )
--> 24 :         python_package.build()
    25 :
    26 :         call([



[1]: function 'build'   ( self.stacktrace[1].ipython() )
  /Users/flavio/working_copies/joy/tests/.hitch/virtualenv/lib/python3.5/site-packages/hitchpython/python_package.py

    77 :                 shutil.rmtree(self.directory)
    78 :             raise HitchPythonBuildError((
--> 79 :                 "Error occurred when trying to build python.\n"
    80 :                 "If the cause is not obvious, please raise an issue at "
    81 :                 "https://github.com/hitchtest/hitchpython/issues detailing:\n"



hitchpython.python_package.HitchPythonBuildError
$ pyenv version
2.7.10 (set by /Users/flavio/.pyenv/version)
$ which python
/Users/flavio/.pyenv/shims/python

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.