Skip to content

Commit

Permalink
Merge pull request #216 from davidbrochart/improve_multipy
Browse files Browse the repository at this point in the history
Improve Python multi-package handling
  • Loading branch information
blink1073 authored Nov 30, 2021
2 parents 07860a7 + 0e05001 commit eb15b3d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions jupyter_releaser/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
import requests
from ghapi.core import GhApi
from pkg_resources import parse_version
from pkginfo import SDist
from pkginfo import Wheel

from jupyter_releaser import changelog
from jupyter_releaser import npm
Expand Down Expand Up @@ -420,9 +422,12 @@ def publish_assets(
name = Path(path).name
suffix = Path(path).suffix
if suffix in [".gz", ".whl"]:
if name.startswith(
python_package_name
): # FIXME: not enough to know it's the right package
if suffix == ".gz":
dist = SDist
else:
dist = Wheel
pkg = dist(path)
if not python_package_name or python_package_name == pkg.name:
env = os.environ.copy()
env["TWINE_PASSWORD"] = twine_token
# NOTE: Do not print the env since a twine token extracted from
Expand Down

0 comments on commit eb15b3d

Please sign in to comment.