Created
July 25, 2013 11:30
-
-
Save Rudd-O/6078875 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From: "Manuel Amador (Rudd-O)" <[email protected]> | |
To: [email protected] | |
Subject: PIP patch to forfeit requirements | |
Date: Wed, 18 Mar 2009 17:26:59 -0500 | |
User-Agent: KMail/1.11.0 (Linux/2.6.28; KDE/4.2.0; x86_64; ; ) | |
X-KMail-Transport: Rudd-O.com | |
X-KMail-QuotePrefix: > | |
MIME-Version: 1.0 | |
Content-Type: multipart/signed; | |
boundary="nextPart3350413.Wev56ftyb1"; | |
protocol="application/pgp-signature"; | |
micalg=pgp-sha1 | |
Content-Transfer-Encoding: 7bit | |
Message-Id: <[email protected]> | |
Status: RO | |
X-Status: RT | |
X-KMail-EncryptionState: | |
X-KMail-SignatureState: | |
X-KMail-MDN-Sent: | |
--nextPart3350413.Wev56ftyb1 | |
Content-Type: multipart/mixed; | |
boundary="Boundary-01=_zUXwJ2rwfCNMlHH" | |
Content-Transfer-Encoding: 7bit | |
Content-Disposition: inline | |
--Boundary-01=_zUXwJ2rwfCNMlHH | |
Content-Type: text/plain; | |
charset="us-ascii" | |
Content-Transfer-Encoding: quoted-printable | |
Content-Disposition: inline | |
Tested it with latest stable pip | |
Good luck, man. | |
=2D-=20 | |
Manuel Amador (Rudd-O) <[email protected]> | |
Rudd-O.com - http://rudd-o.com/ | |
GPG key ID 0xC8D28B92 at http://wwwkeys.pgp.net/ | |
Q: What's the difference between Bell Labs and the Boy Scouts of America? | |
A: The Boy Scouts have adult supervision. | |
--Boundary-01=_zUXwJ2rwfCNMlHH | |
Content-Type: text/x-patch; | |
charset="UTF-8"; | |
name="pip-no-reqs.patch" | |
Content-Transfer-Encoding: quoted-printable | |
Content-Disposition: attachment; | |
filename="pip-no-reqs.patch" | |
=2D-- pip.py 2009-03-18 11:47:39.000000000 -0500 | |
+++ pip.py 2009-03-18 12:03:55.000000000 -0500 | |
@@ -360,6 +360,11 @@ | |
action=3D'store_true', | |
help=3D'Upgrade all packages to the newest available version') | |
self.parser.add_option( | |
+ '-D', '--no-requirements', | |
+ dest=3D'no_requirements', | |
+ action=3D'store_true', | |
+ help=3D'Do not download requirements, just download the specif= | |
ied packages') | |
+ self.parser.add_option( | |
'-I', '--ignore-installed', | |
dest=3D'ignore_installed', | |
action=3D'store_true', | |
@@ -395,7 +400,8 @@ | |
build_dir=3Doptions.build_dir, | |
src_dir=3Doptions.src_dir, | |
upgrade=3Doptions.upgrade, | |
=2D ignore_installed=3Doptions.ignore_installed) | |
+ ignore_installed=3Doptions.ignore_installed, | |
+ no_requirements=3Doptions.no_requirements) | |
for name in args: | |
requirement_set.add_requirement( | |
InstallRequirement.from_line(name, None)) | |
@@ -1664,7 +1670,7 @@ | |
=20 | |
class RequirementSet(object): | |
=20 | |
=2D def __init__(self, build_dir, src_dir, upgrade=3DFalse, ignore_insta= | |
lled=3DFalse): | |
+ def __init__(self, build_dir, src_dir, upgrade=3DFalse, ignore_install= | |
ed=3DFalse, no_requirements=3DFalse): | |
self.build_dir =3D build_dir | |
self.src_dir =3D src_dir | |
self.upgrade =3D upgrade | |
@@ -1673,6 +1679,7 @@ | |
# Mapping of alias: real_name | |
self.requirement_aliases =3D {} | |
self.unnamed_requirements =3D [] | |
+ self.no_requirements =3D no_requirements | |
=20 | |
def __str__(self): | |
reqs =3D [req for req in self.requirements.values() | |
@@ -1786,6 +1793,7 @@ | |
finder.add_dependency_links(req_to_install.dependency_= | |
links) | |
## FIXME: add extras in here: | |
for req in req_to_install.requirements(): | |
+ if self.no_requirements: continue | |
try: | |
name =3D pkg_resources.Requirement.parse(req).= | |
project_name | |
except ValueError, e: | |
--Boundary-01=_zUXwJ2rwfCNMlHH-- | |
--nextPart3350413.Wev56ftyb1 | |
Content-Type: application/pgp-signature; name=signature.asc | |
Content-Description: This is a digitally signed message part. | |
-----BEGIN PGP SIGNATURE----- | |
Version: GnuPG v2.0.9 (GNU/Linux) | |
iD8DBQBJwXU2jqGOUsjSi5IRAprvAJ4uUmfaBdSqlatCu8rvYZ1fiKf0SQCfY3j+ | |
fHD+CI4QaSPNTPxKvIxFHRw= | |
=5Zu3 | |
-----END PGP SIGNATURE----- | |
--nextPart3350413.Wev56ftyb1-- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment