Thanks to visit codestin.com
Credit goes to github.com

Skip to content

make 'wppm -u' work #394

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 12, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions winpython/wppm.py
Original file line number Diff line number Diff line change
Expand Up @@ -754,20 +754,21 @@ def main(test=False):
if not args.install and not args.uninstall:
args.install = True

if not osp.isfile(args.fname):
if not osp.isfile(args.fname) and args.install:
raise IOError("File not found: %s" % args.fname)

if utils.is_python_distribution(args.target):
dist = Distribution(args.target)
try:
package = Package(args.fname)
if package.is_compatible_with(dist):
if args.install:
dist.install(package)
else:
dist.uninstall(package)
if args.uninstall:
package = dist.find_package(args.fname)
dist.uninstall(package)
else:
raise RuntimeError("Package is not compatible with Python "\
package = Package(args.fname)
if args.install and package.is_compatible_with(dist):
dist.install(package)
else:
raise RuntimeError("Package is not compatible with Python "\
"%s %dbit" % (dist.version, dist.architecture))
except NotImplementedError:
raise RuntimeError("Package is not (yet) supported by WPPM")
Expand Down