Post tagged: Python

Installing Python packages in $HOME

So you've become quite familiar with some Python-developed tools, and have installed them on all your computers.

For a new project, you get an account on a new server; alas, your favorite tools isn't installed there. And you don't have root access. How can you remedy to this issue?

Note …

Patching datetime.date.today() across Python implementations

Altering builtin functions and classes of Python during tests if often frowned upon, but can be actually required while writing unit tests.

The typical builtin requiring such alterations are the datetime.date.today and datetime.datetime.now() functions, which return (obviously) time-dependent values.

We'll take a look at this issue …

Setting up a private, team-wide PyPI repository

When developing Python applications, it may be useful to store some applications in a private repository.

This provides several benefits:

  • Dependencies available even if PyPI and its mirrors are down
  • Storing custom forks of upstream packages
  • Providing private packages in a standardized manner.

For this purpose, three components are required …