@@ -61,29 +61,15 @@ def __init__(self, fname):
61
61
self .fname = fname
62
62
self .name = None
63
63
self .version = None
64
- self .pyversion = None
65
64
self .description = None
66
65
self .url = None
67
66
68
67
def __str__ (self ):
69
68
text = f"{ self .name } { self .version } "
70
- pytext = ""
71
- if self .pyversion is not None :
72
- pytext = f" for Python { self .pyversion } "
73
- if not pytext :
74
- pytext = " for Python"
69
+ pytext = " for Python"
75
70
text += f"{ pytext } \n { self .description } \n Website: { self .url } \n [{ Path (self .fname ).name } ]"
76
71
return text
77
72
78
- def is_compatible_with (self , distribution ):
79
- """Return True if package is compatible with distribution in terms of
80
- Python version (if applyable)"""
81
- iscomp = True
82
- if self .pyversion is not None :
83
- # Non-pure Python package
84
- iscomp = iscomp and self .pyversion == distribution .version
85
- return iscomp
86
-
87
73
def extract_optional_infos (self , update = False , suggested_summary = None ):
88
74
"""Extract package optional infos (description, url)
89
75
from the package database"""
@@ -113,7 +99,6 @@ def extract_infos(self):
113
99
self .name = bname2 [0 ]
114
100
self .version = "-" .join (list (bname2 [1 :- 3 ]))
115
101
self .pywheel , abi , arch = bname2 [- 3 :]
116
- self .pyversion = None # Let's ignore this self.pywheel
117
102
# wheel arch is 'win32' or 'win_amd64'
118
103
return
119
104
elif bname .endswith ((".zip" , ".tar.gz" , ".whl" )):
@@ -276,8 +261,6 @@ def patch_all_shebang(
276
261
277
262
def install (self , package , install_options = None ):
278
263
"""Install package in distribution"""
279
- assert package .is_compatible_with (self )
280
-
281
264
# wheel addition
282
265
if package .fname .endswith ((".whl" , ".tar.gz" , ".zip" )):
283
266
self .install_bdist_direct (package , install_options = install_options )
@@ -778,13 +761,8 @@ def main(test=False):
778
761
dist .uninstall (package )
779
762
else :
780
763
package = Package (args .fname )
781
- if args .install and package . is_compatible_with ( dist ) :
764
+ if args .install :
782
765
dist .install (package )
783
- else :
784
- raise RuntimeError (
785
- "Package is not compatible with Python "
786
- f"{ dist .version } { dist .architecture } bit"
787
- )
788
766
except NotImplementedError :
789
767
raise RuntimeError ("Package is not (yet) supported by WPPM" )
790
768
else :
0 commit comments