Module gcip.addons.python.jobs.build
Classes
class BdistWheel (*, pipenv_version_specifier: str = '', jobName: dataclasses.InitVar[str] = 'bdist_wheel', jobStage: dataclasses.InitVar[str] = 'build')
-
Runs
python3 setup.py bdist_wheel
and installs project requirements before (scripts.pip_install_requirements()
)- Requires a
Pipfile.lock
orrequirements.txt
in your project folder containing at leastsetuptools
- Creates artifacts under the path
dist/
This subclass of
Job
will configure following defaults for the superclass:- name: bdist_wheel
- stage: build
- artifacts: Path 'dist/'
Args
pipenv_version_specifier
- The version hint of pipenv to install if
Pipfile.lock
is found. For example '==2022.08.15'. Defaults to an empty string, which means the latest
Expand source code
@dataclass(kw_only=True) class BdistWheel(Job): """ Runs `python3 setup.py bdist_wheel` and installs project requirements before (`scripts.pip_install_requirements()`) * Requires a `Pipfile.lock` or `requirements.txt` in your project folder containing at least `setuptools` * Creates artifacts under the path `dist/` This subclass of `Job` will configure following defaults for the superclass: * name: bdist_wheel * stage: build * artifacts: Path 'dist/' Args: pipenv_version_specifier: The version hint of pipenv to install if `Pipfile.lock` is found. For example '==2022.08.15'. Defaults to an empty string, which means the latest """ pipenv_version_specifier: str = "" jobName: InitVar[str] = "bdist_wheel" jobStage: InitVar[str] = "build" def __post_init__(self, jobName: str, jobStage: str) -> None: super().__init__(script="", name=jobName, stage=jobStage) self.artifacts.add_paths("dist/") def render(self) -> Dict[str, Any]: self._scripts = [ pip_install_requirements( pipenv_version_specifier=self.pipenv_version_specifier ), "pip list | grep setuptools-git-versioning && " + install_packages("git"), "python3 setup.py bdist_wheel", ] return super().render()
Ancestors
Class variables
var jobName : dataclasses.InitVar[str]
var jobStage : dataclasses.InitVar[str]
var pipenv_version_specifier : str
Inherited members
Job
:add_dependencies
add_needs
add_tags
add_variables
allow_failure
append_rules
append_scripts
artifacts
cache
dependencies
environment
image
name
needs
prepend_rules
prepend_scripts
render
resource_group
retry
rules
scripts
set_allow_failure
set_artifacts
set_cache
set_dependencies
set_environment
set_image
set_needs
set_resource_group
set_retry
set_tags
set_timeout
set_when
stage
tags
timeout
variables
when
- Requires a