Skip to content
This repository has been archived by the owner on Mar 21, 2019. It is now read-only.
/ restricted_pkg Public archive

[OBSOLETE] Enforcing use of a private PyPI mirror in your setup.py script

License

Notifications You must be signed in to change notification settings

rbarrois/restricted_pkg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

restricted_pkg

Obsolete

This package was useful before Python packaging's recent improvements (circa 2013 onwards).

With recent setuptools versions, one can instruct python setup.py upload to only target a given index through a few configuration lines:

# setup.cfg
[register]
repository = https://pypi.example.domain/

[upload]
repository = https://pypi.example.domain/

Due to this native feature, this package is NO LONGER MAINTAINED.

Previous docs

This python package provide a simple wrapper around Distribute to handle private projects. It is mostly intended for use in a package's setup.py script.

It provides the following features:

  • Using a private package index when fetching package dependencies during python setup.py install
  • Restricting the register and upload commands to a private package index, or to disable them completely
  • Easy support for authenticated URLs when accessing the index.

Compatibility

The restricted_pkg package requires Distribute, and supports Python 2.6 and later (including Python3).

Usage

In your setup.py script, ensure you have the following lines:

from setuptools import find_packages
from restricted_pkg import setup

setup(
    ...,
    private_repository="https://@myrepo.example.tld/path/to/repo",
    install_requires=[
        "distribute",
        "restricted_pkg",
    ],
)

About

[OBSOLETE] Enforcing use of a private PyPI mirror in your setup.py script

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages