Tag: python

Why am I missing git2.h and how do I get it back?

I am experiencing an odd problem every time I try the set-up of pygit2. Below is what I run and the error generated. $ python3 setup.py install running install running build running build_py running build_ext building ‘_pygit2’ extension /usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Os -w -pipe -march=native -Qunused-arguments -mmacosx-version-min=10.7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk -isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/include […]

Unittesting Python code which uses subprocess.Popen

I have a Python project in which I read external files, process them, and write the results to a new file. The input files can either be read directly, or extracted from a git repository using git show. The function to call git show and return stdout looks like this: def git_show(fname, rev): ”’Runs git […]

Clear postgresql and alembic and start over from scratch

Everything I found about this via searching was either wrong or incomplete in some way. So, how do I: delete everything in my postgresql database delete all my alembic revisions make it so that my database is 100% like new

Sharing python modules between applications with git sub modules or svn:externals

In our company we’re using subversion. We have different python modules (own and third party) in different versions in use. The various applications we develop have various dependencies regarding the version of the shared modules. One possibility is using virtualenv installing the modules from a local pypi server. So on every initial checkout we need […]

How to ensure there are no pdb calls out of debugging configuration?

What do you suggest to get rid of pdb calls on production software? In my case, I’m developing a django website. I don’t know if I should: Monkey patch pdb from settings.py (dependding on DEBUG boolean). Make a pdb wrapper for our project which expose set_trace or print basic log if DEBUG = True Dissalow […]

How can I display output in a pager after a git command?

I build a script that should be used with git, so that output is sent to a pager after a git command. I would like to do this using Python. I have a python script that writes to stdout. Now I would like to display its output in the pager the user has set in […]

Git not commiting files

I created an executable of my Python Software via Py2Exe, which creates two new directories and multiple files in them. I also created a new Python File for doing this, called setup.py. Whenever I open up Git GUI it shows the only uncommitted changes are in my .idea\workspace.xml file (this comes up with every commit), […]

Django + twitter bootstrap + github what's the most elegant way to do this?

Let’s assume that I have a project or two that I’m building with Django and twitter bootsrap. The said projects are versioned in git repositories. Currently, I, like most people, will (or would) just download bootstrap, do some cp -r and git add commands and happily code away. But now I stopped thinking. Everything is […]

ezyang / git-ftp on Windows

I have been trying to install git-ftp from https://github.com/ezyang/git-ftp on my windows. I know most of git-ftp need cygwin or just cant be install on windows but, since its coded in Python and you can install a Python interpreter on windows, i tough i could install it. I installed Python 3.2, added it to my […]

Finding the first commit on a branch with GitPython

I’m writing a git post-receive hook using Python and Git-Python that gathers information about the commits contained in a push, then updates our bug tracker and IM with a summary. I’m having trouble in the case where a push creates a branch (i.e. the fromrev parameter to post-receive is all zeroes) and also spans several […]

Git Baby is a git and github fan, let's start git clone.