Skip to content

Commit

Permalink
Ignore pkg-resources in pip-sync
Browse files Browse the repository at this point in the history
Fix #422
  • Loading branch information
cemsbr committed Aug 31, 2017
1 parent fe8c30e commit 0d68da9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ when `--allow-unsafe` was not set. ([#517](https://github.com/jazzband/pip-tools
- Fixed bug where editable PyPI dependencies would have a `download_dir` and be exposed to `git-checkout-index`,
(thus losing their VCS directory) and `python setup.py egg_info` fails. ([#385](https://github.com/jazzband/pip-tools/pull/385#) and [#538](https://github.com/jazzband/pip-tools/pull/538)). Thanks @blueyed and @dfee
- Fixed bug where some primary dependencies were annotated with "via" info comments. ([#542](https://github.com/jazzband/pip-tools/pull/542)). Thanks @quantus
- Fixed bug where pkg-resources would be removed by pip-sync in Ubuntu. ([#555](https://github.com/jazzband/pip-tools/pull/555)). Thanks @cemsbr

# 1.9.0 (2017-04-12)

Expand Down
1 change: 1 addition & 0 deletions piptools/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
'pip',
'pip-tools',
'pip-review',
'pkg-resources',
'setuptools',
'wheel',
]
Expand Down
10 changes: 10 additions & 0 deletions tests/test_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,16 @@ def test_diff_should_uninstall(fake_dist):
assert to_uninstall == {'django'} # no version spec when uninstalling


def test_diff_should_not_uninstall(fake_dist):
ignored = ('pip==7.1.0', 'pip-tools==1.1.1', 'pip-review==1.1.1',
'pkg-resources==0.0.0', 'setuptools==34.0.0', 'wheel==0.29.0')
installed = [fake_dist(pkg) for pkg in ignored]
reqs = []

to_uninstall = diff(reqs, installed)[1]
assert to_uninstall == set()


def test_diff_should_update(fake_dist, from_line):
installed = [fake_dist('django==1.7')]
reqs = [from_line('django==1.8')]
Expand Down

0 comments on commit 0d68da9

Please sign in to comment.