Commit 8fa9a42c authored by André Anjos's avatar André Anjos 💬
Browse files

[build] Rename osname() to conda_arch(); Reflect these changes; Fix git clean cmd

parent fa9beb74
Pipeline #26043 passed with stages
in 4 minutes and 2 seconds
......@@ -26,8 +26,8 @@ import distutils.version
import conda_build.api
def osname():
"""Returns the current OS name as recognized by conda"""
def conda_arch():
"""Returns the current OS name and architecture as recognized by conda"""
r = 'unknown'
if platform.system().lower() == 'linux':
......@@ -329,8 +329,9 @@ if __name__ == '__main__':
verbose=True)
# runs the build using the conda-build API
arch = conda_arch()
logger.info('Building %s-%s-py%s (build: %d) for %s',
name, version, pyver.replace('.',''), build_number, osname())
name, version, pyver.replace('.',''), build_number, arch)
conda_build.api.build(os.path.join(workdir, 'conda'), config=conda_config)
# runs git clean to clean everything that is not needed. This helps to keep
......@@ -339,7 +340,7 @@ if __name__ == '__main__':
"miniconda.sh", #the installer, cached
"miniconda/pkgs/*.tar.bz2", #downloaded packages, cached
"miniconda/pkgs/urls.txt", #download index, cached
"miniconda/conda-bld/${_os}-64/*.tar.bz2", #build artifact -- conda
"miniconda/conda-bld/%s/*.tar.bz2" % (arch,), #build artifact -- conda
"dist/*.zip", #build artifact -- pypi package
"sphinx", #build artifact -- documentation
]
......
......@@ -12,7 +12,7 @@ import yaml
from . import bdt
from ..log import verbosity_option
from ..build import next_build_number, osname, should_skip_build, \
from ..build import next_build_number, conda_arch, should_skip_build, \
get_rendered_metadata, get_parsed_recipe, make_conda_config
from ..constants import CONDA_BUILD_CONFIG, CONDA_RECIPE_APPEND, \
SERVER, MATPLOTLIB_RCDIR, BASE_CONDARC
......@@ -125,9 +125,10 @@ def build(recipe_dir, python, condarc, config, no_test, append_file,
metadata = get_rendered_metadata(d, conda_config)
# checks we should actually build this recipe
arch = conda_arch()
if should_skip_build(metadata):
logger.warn('Skipping UNSUPPORTED build of "%s" for py%s on %s',
d, python.replace('.',''), osname())
d, python.replace('.',''), arch)
return 0
# converts the metadata output into parsed yaml and continues the process
......@@ -143,7 +144,7 @@ def build(recipe_dir, python, condarc, config, no_test, append_file,
logger.info('Building %s-%s-py%s (build: %d) for %s',
rendered_recipe['package']['name'],
rendered_recipe['package']['version'], python.replace('.',''),
build_number, osname())
build_number, arch)
if not dry_run:
from conda_build.api import build
build(d, config=conda_config, notest=no_test)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment