Skip to content

Commit

Permalink
fix: put the binary under bin directly (#1254)
Browse files Browse the repository at this point in the history
Signed-off-by: Frost Ming <[email protected]>

Signed-off-by: Frost Ming <[email protected]>
  • Loading branch information
frostming authored Dec 2, 2022
1 parent c7fd12b commit 5cbed88
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 32 deletions.
22 changes: 0 additions & 22 deletions envd/cmd.py

This file was deleted.

12 changes: 2 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# limitations under the License.

import os
import shutil
from setuptools.command.sdist import sdist
from setuptools import setup, Extension, find_packages
from setuptools.command.build_ext import build_ext
Expand All @@ -35,7 +34,7 @@ def build_envd_if_not_found():
errno = subprocess.call(
["make", "build-release", "GIT_TAG={}".format(tag)]
)
except:
except OSError:
logging.warning(".GIT_TAG_INFO not found")
logging.info("start building envd from source")
errno = subprocess.call(["make", "build-release"])
Expand All @@ -51,10 +50,7 @@ def build_extension(self, ext: Extension) -> None:
if not isinstance(ext, EnvdExtension):
return super().build_extension(ext)

bin_path = os.path.join(self.build_lib, "envd", "bin")
build_envd_if_not_found()
os.makedirs(bin_path, exist_ok=True)
shutil.copy("bin/envd", bin_path)


class SdistCommand(sdist):
Expand Down Expand Up @@ -108,11 +104,7 @@ def get_version():
packages=find_packages(),
include_package_data=True,
python_requires=">=3.6",
entry_points={
"console_scripts": [
"envd=envd.cmd:envd",
],
},
data_files=[("bin", ["bin/envd"])],
classifiers=classifiers,
zip_safe=False,
ext_modules=[
Expand Down

0 comments on commit 5cbed88

Please sign in to comment.