Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5839911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T11:39:34+00:00 2026-05-22T11:39:34+00:00

I currently have git and virtualenv set up in a way which exactly suits

  • 0

I currently have git and virtualenv set up in a way which exactly
suits my needs and, so far, hasn’t caused any problems. However I’m aware that
my setup is non-standard and I’m wondering if anyone more familiar with virtualenv’s
internals can point out if, and where, it’s likely to go wrong.

My setup

My virtualenv is inside my git repository, but git is set to ignore the bin and include directories and everything in lib except for the site-packages directory.

More precisely, my .gitignore file looks like this:

*.pyc

# Ignore all the virtualenv stuff except the actual packages
# themselves
/bin
/include
/lib/python*/*
!/lib/python*/site-packages

# Ignore easyinstall and setuptools
/lib/python*/site-packages/easy-install.pth
/lib/python*/site-packages/setuptools.pth
/lib/python*/site-packages/setuptools-*
/lib/python*/site-packages/pip-*

With this arrangement I — and anyone else working on a checkout of the project — can use virtualenv and pip as normal but with the following advantages:

  1. If anyone updates or installs a package and pushes their changes, anyone else who pulls those changes automatically gets the update: they don’t need to notice that a requirements.txt file has changed or do any post-receive hook magic.

  2. There are no network dependencies: all the code to make the application work lives in the git repository.

I’m aware that this only works with pure-Python packages, but that’s all I’m concerned with at the moment.

Does anyone know of any other problems with this approach that I should be aware of?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T11:39:35+00:00Added an answer on May 22, 2026 at 11:39 am

    If you have any -e items in your requirements.txt – in other words if you have any editable dependencies as described in the format that are using the git version control system you will most likely run into issues when your src directory is committed. If you just add /src to your .gitignore then you can avoid this problem, but often the installation just adds a pointer in site-packages to this location, so you need it!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have speakers set up both in my office and in my living
We currently have code like this: Dim xDoc = XDocument.Load(myXMLFilePath) The only way we
I currently have a functioning in-house Windows Forms application which extensively uses the DataGridView
I currently have a git repository that I imported from svn a while ago
I currently have a git setup where git is a user on my linux
I'm using Git to manage my website's source code and deployment, and currently have
I'll set the scene first... We use Subversion and currently have a reasonably large
I have a git repository, which has changes that I am slowly bringing into
Context We have a homegrown filesystem-backed caching library. We currently have performance problems with
I'm the sole developer at my job and we currently do not have any

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.