11# -*- coding: utf-8 -*-
22#
3+ # WinPython Package Manager
34# Copyright © 2012 Pierre Raybaut
5+ # Copyright © 2014-2025+ The Winpython development team https://github.com/winpython/
46# Licensed under the terms of the MIT License
57# (see winpython/__init__.py for details)
68
7- """
8- WinPython Package Manager
9-
10- Created on Fri Aug 03 14:32:26 2012
11- """
12-
139import os
1410from pathlib import Path
1511import shutil
2218# Local imports
2319from winpython import utils , piptree
2420
25-
2621# Workaround for installing PyVISA on Windows from source:
2722os .environ ["HOME" ] = os .environ ["USERPROFILE" ]
2823
2924class Package :
3025 "standardize a Package from filename or pip list"
31- def __init__ (self , fname , suggested_summary = None ):
26+ def __init__ (self , fname , suggested_summary = None ):
3227 self .fname = fname
33- self .description = piptree .sum_up (suggested_summary ) if suggested_summary else ""
28+ self .description = piptree .sum_up (suggested_summary ) if suggested_summary else ""
3429 self .name = None
3530 self .version = None
3631 if fname .endswith ((".zip" , ".tar.gz" , ".whl" )):
@@ -39,14 +34,12 @@ def __init__(self, fname, suggested_summary=None):
3934 if infos is not None :
4035 self .name , self .version = infos
4136 self .name = utils .normalize (self .name )
42- self .url = None
37+ self .url = f"https://pypi.org/project/ { self . name } "
4338 self .files = []
4439
45- setattr (self ,'url' ,"https://pypi.org/project/" + self .name )
46-
4740 def __str__ (self ):
4841 return f"{ self .name } { self .version } \r \n { self .description } \r \n Website: { self .url } "
49-
42+
5043
5144class Distribution :
5245 def __init__ (self , target = None , verbose = False ):
0 commit comments