File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 13
13
import requests
14
14
from ghapi .core import GhApi
15
15
from pkg_resources import parse_version
16
+ from pkginfo import SDist
17
+ from pkginfo import Wheel
16
18
17
19
from jupyter_releaser import changelog
18
20
from jupyter_releaser import npm
@@ -420,9 +422,12 @@ def publish_assets(
420
422
name = Path (path ).name
421
423
suffix = Path (path ).suffix
422
424
if suffix in [".gz" , ".whl" ]:
423
- if name .startswith (
424
- python_package_name
425
- ): # FIXME: not enough to know it's the right package
425
+ if suffix == ".gz" :
426
+ dist = SDist
427
+ else :
428
+ dist = Wheel
429
+ pkg = dist (path )
430
+ if not python_package_name or python_package_name == pkg .name :
426
431
env = os .environ .copy ()
427
432
env ["TWINE_PASSWORD" ] = twine_token
428
433
# NOTE: Do not print the env since a twine token extracted from
You can’t perform that action at this time.
0 commit comments