@@ -130,7 +130,8 @@ def copy_platform_libraries(platform_name, clean_first=False):
130130def find_available_platforms ():
131131 """Scan the artifacts directory for available platform-specific libraries."""
132132 if not ARTIFACTS_DIR .exists ():
133- raise ValueError (f"Artifacts directory not found: { ARTIFACTS_DIR } " )
133+ print (f"Warning: Artifacts directory not found: { ARTIFACTS_DIR } " )
134+ return []
134135
135136 available_platforms = []
136137 for platform_name in PLATFORM_FOLDERS .keys ():
@@ -139,7 +140,8 @@ def find_available_platforms():
139140 available_platforms .append (platform_name )
140141
141142 if not available_platforms :
142- raise ValueError ("No platform-specific libraries found in artifacts directory" )
143+ print ("Warning: No platform-specific libraries found in artifacts directory" )
144+ return []
143145
144146 return available_platforms
145147
@@ -152,6 +154,28 @@ def find_available_platforms():
152154# For wheel building
153155if 'bdist_wheel' in sys .argv :
154156 available_platforms = find_available_platforms ()
157+ if not available_platforms :
158+ print ("No platform-specific libraries found. Building wheel without platform-specific libraries." )
159+ setup (
160+ name = "c2pa-python" ,
161+ version = "0.10.0" ,
162+ package_dir = {"" : "src" },
163+ packages = find_packages (where = "src" ),
164+ include_package_data = True ,
165+ package_data = {
166+ "c2pa" : ["libs/*" ], # Include all files in libs directory
167+ },
168+ classifiers = [
169+ "Programming Language :: Python :: 3" ,
170+ get_platform_classifier (get_current_platform ()),
171+ ],
172+ python_requires = ">=3.10" ,
173+ long_description = open ("README.md" ).read (),
174+ long_description_content_type = "text/markdown" ,
175+ license = "MIT OR Apache-2.0" ,
176+ )
177+ sys .exit (0 )
178+
155179 print (f"Found libraries for platforms: { ', ' .join (available_platforms )} " )
156180
157181 for platform_name in available_platforms :
@@ -168,7 +192,7 @@ def find_available_platforms():
168192 name = "c2pa-python" ,
169193 version = "0.10.0" ,
170194 package_dir = {"" : "src" },
171- packages = find_packages (where = "src" ) + [ "c2pa.libs" ] ,
195+ packages = find_packages (where = "src" ),
172196 include_package_data = True ,
173197 package_data = {
174198 "c2pa" : ["libs/*" ], # Include all files in libs directory
@@ -177,6 +201,10 @@ def find_available_platforms():
177201 "Programming Language :: Python :: 3" ,
178202 get_platform_classifier (platform_name ),
179203 ],
204+ python_requires = ">=3.10" ,
205+ long_description = open ("README.md" ).read (),
206+ long_description_content_type = "text/markdown" ,
207+ license = "MIT OR Apache-2.0" ,
180208 )
181209 finally :
182210 # Clean up by removing the package libs directory
@@ -198,8 +226,8 @@ def find_available_platforms():
198226 "Programming Language :: Python :: 3" ,
199227 get_platform_classifier (get_current_platform ()),
200228 ],
201- # Add sdist-specific configuration
229+ python_requires = ">=3.10" ,
202230 long_description = open ("README.md" ).read (),
203231 long_description_content_type = "text/markdown" ,
204- python_requires = ">=3.7 " ,
232+ license = "MIT OR Apache-2.0 " ,
205233)
0 commit comments