in package.py [0:0]
def build_sdist() -> str:
cmd = [sys.executable, "setup.py", "sdist"]
check_call(cmd, cwd=os.path.abspath("gridengine"))
# see below for more: cyclecloud*gridengine so we cover cyclecloud-gridengine and cyclecloud_gridengine
sdists = glob.glob("gridengine/dist/cyclecloud*gridengine-*.tar.gz")
assert len(sdists) == 1, "Found %d sdist packages, expected 1" % len(sdists)
path = sdists[0]
# at some point setuptools changed the name of the sdist package to use underscores instead of dashes.
if "/cyclecloud_gridengine-" in path:
fixed_path = path.replace("/cyclecloud_gridengine-", "/cyclecloud-gridengine-")
os.rename(path, fixed_path)
path = fixed_path
fname = os.path.basename(path)
dest = os.path.join("libs", fname)
if os.path.exists(dest):
os.remove(dest)
shutil.move(path, dest)
return fname