kopia lustrzana https://github.com/jupyterhub/repo2docker
Bump Black version (20.8b1) and use --target-version=py36
rodzic
f45d84be1f
commit
fadb3c8dc8
|
@ -1,6 +1,6 @@
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/ambv/black
|
- repo: https://github.com/ambv/black
|
||||||
rev: 19.10b0
|
rev: 20.8b1
|
||||||
hooks:
|
hooks:
|
||||||
- id: black
|
- id: black
|
||||||
args: [--target-version=py35]
|
args: [--target-version=py36]
|
||||||
|
|
|
@ -266,8 +266,7 @@ class CondaBuildPack(BaseImage):
|
||||||
return assemble_files
|
return assemble_files
|
||||||
|
|
||||||
def get_env_scripts(self):
|
def get_env_scripts(self):
|
||||||
"""Return series of build-steps specific to this source repository.
|
"""Return series of build-steps specific to this source repository."""
|
||||||
"""
|
|
||||||
scripts = []
|
scripts = []
|
||||||
environment_yml = self.binder_path("environment.yml")
|
environment_yml = self.binder_path("environment.yml")
|
||||||
env_prefix = "${KERNEL_PYTHON_PREFIX}" if self.py2 else "${NB_PYTHON_PREFIX}"
|
env_prefix = "${KERNEL_PYTHON_PREFIX}" if self.py2 else "${NB_PYTHON_PREFIX}"
|
||||||
|
@ -340,6 +339,5 @@ class CondaBuildPack(BaseImage):
|
||||||
return scripts
|
return scripts
|
||||||
|
|
||||||
def detect(self):
|
def detect(self):
|
||||||
"""Check if current repo should be built with the Conda BuildPack.
|
"""Check if current repo should be built with the Conda BuildPack."""
|
||||||
"""
|
|
||||||
return os.path.exists(self.binder_path("environment.yml")) and super().detect()
|
return os.path.exists(self.binder_path("environment.yml")) and super().detect()
|
||||||
|
|
|
@ -8,8 +8,7 @@ class NixBuildPack(BaseImage):
|
||||||
"""A nix Package Manager BuildPack"""
|
"""A nix Package Manager BuildPack"""
|
||||||
|
|
||||||
def get_path(self):
|
def get_path(self):
|
||||||
"""Return paths to be added to PATH environemnt variable
|
"""Return paths to be added to PATH environemnt variable"""
|
||||||
"""
|
|
||||||
return super().get_path() + ["/home/${NB_USER}/.nix-profile/bin"]
|
return super().get_path() + ["/home/${NB_USER}/.nix-profile/bin"]
|
||||||
|
|
||||||
def get_env(self):
|
def get_env(self):
|
||||||
|
@ -47,16 +46,14 @@ class NixBuildPack(BaseImage):
|
||||||
]
|
]
|
||||||
|
|
||||||
def get_build_script_files(self):
|
def get_build_script_files(self):
|
||||||
"""Dict of files to be copied to the container image for use in building
|
"""Dict of files to be copied to the container image for use in building"""
|
||||||
"""
|
|
||||||
return {
|
return {
|
||||||
"nix/install-nix.bash": "/home/${NB_USER}/.local/bin/install-nix.bash",
|
"nix/install-nix.bash": "/home/${NB_USER}/.local/bin/install-nix.bash",
|
||||||
"nix/nix-shell-wrapper": "/usr/local/bin/nix-shell-wrapper",
|
"nix/nix-shell-wrapper": "/usr/local/bin/nix-shell-wrapper",
|
||||||
}
|
}
|
||||||
|
|
||||||
def get_assemble_scripts(self):
|
def get_assemble_scripts(self):
|
||||||
"""Return series of build-steps specific to this source repository.
|
"""Return series of build-steps specific to this source repository."""
|
||||||
"""
|
|
||||||
return super().get_assemble_scripts() + [
|
return super().get_assemble_scripts() + [
|
||||||
(
|
(
|
||||||
"${NB_USER}",
|
"${NB_USER}",
|
||||||
|
|
|
@ -93,8 +93,7 @@ class PipfileBuildPack(CondaBuildPack):
|
||||||
return scripts
|
return scripts
|
||||||
|
|
||||||
def get_assemble_scripts(self):
|
def get_assemble_scripts(self):
|
||||||
"""Return series of build-steps specific to this repository.
|
"""Return series of build-steps specific to this repository."""
|
||||||
"""
|
|
||||||
# If we have either Pipfile.lock, Pipfile, or runtime.txt declare the
|
# If we have either Pipfile.lock, Pipfile, or runtime.txt declare the
|
||||||
# use of Python 2, Python 2.7 will be made available in the *kernel*
|
# use of Python 2, Python 2.7 will be made available in the *kernel*
|
||||||
# environment. The notebook servers environment on the other hand
|
# environment. The notebook servers environment on the other hand
|
||||||
|
@ -168,8 +167,7 @@ class PipfileBuildPack(CondaBuildPack):
|
||||||
return assemble_scripts
|
return assemble_scripts
|
||||||
|
|
||||||
def detect(self):
|
def detect(self):
|
||||||
"""Check if current repo should be built with the Pipfile buildpack.
|
"""Check if current repo should be built with the Pipfile buildpack."""
|
||||||
"""
|
|
||||||
# first make sure python is not explicitly unwanted
|
# first make sure python is not explicitly unwanted
|
||||||
runtime_txt = self.binder_path("runtime.txt")
|
runtime_txt = self.binder_path("runtime.txt")
|
||||||
if os.path.exists(runtime_txt):
|
if os.path.exists(runtime_txt):
|
||||||
|
|
|
@ -132,8 +132,7 @@ class PythonBuildPack(CondaBuildPack):
|
||||||
return assemble_scripts
|
return assemble_scripts
|
||||||
|
|
||||||
def detect(self):
|
def detect(self):
|
||||||
"""Check if current repo should be built with the Python buildpack.
|
"""Check if current repo should be built with the Python buildpack."""
|
||||||
"""
|
|
||||||
requirements_txt = self.binder_path("requirements.txt")
|
requirements_txt = self.binder_path("requirements.txt")
|
||||||
runtime_txt = self.binder_path("runtime.txt")
|
runtime_txt = self.binder_path("runtime.txt")
|
||||||
setup_py = "setup.py"
|
setup_py = "setup.py"
|
||||||
|
|
Ładowanie…
Reference in New Issue