Skip to content

Commit

Permalink
build: also run js build with pip install
Browse files Browse the repository at this point in the history
  • Loading branch information
mariobuikhuizen committed Feb 28, 2024
1 parent f95f13a commit ff6ae5d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

from pynpm import NPMPackage
from setuptools import Command, setup
from setuptools.command.develop import develop
from setuptools.command.egg_info import egg_info
from setuptools.command.install import install

ROOT = Path(__file__).parent
sys.path.append(str(ROOT))
Expand All @@ -29,7 +31,7 @@ class DecoratedCommand(command):

def run(self):
"""Run the command"""
if sys.argv[1] == "sdist":
if sys.argv[1] == "sdist" or sys.argv[1] == "dist_info":
from generate_source import generate_source

npm = NPMPackage(ROOT / "js" / "package.json")
Expand Down Expand Up @@ -62,4 +64,10 @@ def get_data_files():
]


setup(cmdclass={"egg_info": js_prerelease(egg_info)})
setup(
cmdclass={
"egg_info": js_prerelease(egg_info),
"install": js_prerelease(install),
"develop": js_prerelease(develop),
}
)

0 comments on commit ff6ae5d

Please sign in to comment.