Skip to content

Commit 0ece2dd

Browse files
authored
Check build-system before installing (#322)
1 parent 02418b2 commit 0ece2dd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

jupyter_releaser/lib.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from subprocess import CalledProcessError
1414

1515
import requests
16+
import toml
1617
from ghapi.core import GhApi
1718
from packaging.version import parse as parse_version
1819
from pkginfo import SDist, Wheel
@@ -599,7 +600,11 @@ def prep_git(ref, branch, repo, auth, username, url):
599600
# Install the package
600601
# install python package in editable mode with dev and test deps
601602
if util.PYPROJECT.exists():
602-
util.run('pip install -q -e ".[dev,test]"')
603+
# check the package can be installed first
604+
text = util.PYPROJECT.read_text(encoding="utf-8")
605+
data = toml.loads(text)
606+
if data.get("build-system"):
607+
util.run('pip install -q -e ".[dev,test]"')
603608

604609
# prefer yarn if yarn lock exists
605610
elif util.YARN_LOCK.exists():

0 commit comments

Comments
 (0)