make setup.py more normal, except in our exceptional case (#13214)

This commit is contained in:
Kyle Altendorf 2022-09-16 16:58:11 -04:00 committed by GitHub
parent a9cce0f6e0
commit ed78e9ffbf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -44,7 +44,7 @@ fi
export BUILD_VDF_BENCH=Y # Installs the useful vdf_bench test of CPU squaring speed
THE_PATH=$(python -c 'import pkg_resources; print( pkg_resources.get_distribution("chiavdf").location)' 2>/dev/null)/vdf_client
CHIAVDF_VERSION=$(python -c 'from setup import dependencies; t = [_ for _ in dependencies if _.startswith("chiavdf")][0]; print(t)')
CHIAVDF_VERSION=$(python -c 'import os; os.environ["CHIA_SKIP_SETUP"] = "1"; from setup import dependencies; t = [_ for _ in dependencies if _.startswith("chiavdf")][0]; print(t)')
ubuntu_cmake_install() {
UBUNTU_PRE_2004=$(python -c 'import subprocess; process = subprocess.run(["lsb_release", "-rs"], stdout=subprocess.PIPE); print(float(process.stdout) < float(20.04))')

View file

@ -1,3 +1,5 @@
import os
from setuptools import setup
dependencies = [
@ -158,5 +160,5 @@ kwargs = dict(
)
if __name__ == "__main__":
if len(os.environ.get("CHIA_SKIP_SETUP", "")) < 1:
setup(**kwargs) # type: ignore