Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.devtools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.devtools
Commits
8fa9a42c
Commit
8fa9a42c
authored
6 years ago
by
André Anjos
Browse files
Options
Downloads
Patches
Plain Diff
[build] Rename osname() to conda_arch(); Reflect these changes; Fix git clean cmd
parent
fa9beb74
No related branches found
No related tags found
No related merge requests found
Pipeline
#26043
passed
6 years ago
Stage: build
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bob/devtools/build.py
+5
-4
5 additions, 4 deletions
bob/devtools/build.py
bob/devtools/scripts/build.py
+4
-3
4 additions, 3 deletions
bob/devtools/scripts/build.py
with
9 additions
and
7 deletions
bob/devtools/build.py
+
5
−
4
View file @
8fa9a42c
...
@@ -26,8 +26,8 @@ import distutils.version
...
@@ -26,8 +26,8 @@ import distutils.version
import
conda_build.api
import
conda_build.api
def
osname
():
def
conda_arch
():
"""
Returns the current OS name as recognized by conda
"""
"""
Returns the current OS name
and architecture
as recognized by conda
"""
r
=
'
unknown
'
r
=
'
unknown
'
if
platform
.
system
().
lower
()
==
'
linux
'
:
if
platform
.
system
().
lower
()
==
'
linux
'
:
...
@@ -329,8 +329,9 @@ if __name__ == '__main__':
...
@@ -329,8 +329,9 @@ if __name__ == '__main__':
verbose
=
True
)
verbose
=
True
)
# runs the build using the conda-build API
# runs the build using the conda-build API
arch
=
conda_arch
()
logger
.
info
(
'
Building %s-%s-py%s (build: %d) for %s
'
,
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
)
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
# runs git clean to clean everything that is not needed. This helps to keep
...
@@ -339,7 +340,7 @@ if __name__ == '__main__':
...
@@ -339,7 +340,7 @@ if __name__ == '__main__':
"
miniconda.sh
"
,
#the installer, cached
"
miniconda.sh
"
,
#the installer, cached
"
miniconda/pkgs/*.tar.bz2
"
,
#downloaded packages, cached
"
miniconda/pkgs/*.tar.bz2
"
,
#downloaded packages, cached
"
miniconda/pkgs/urls.txt
"
,
#download index, 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
"
dist/*.zip
"
,
#build artifact -- pypi package
"
sphinx
"
,
#build artifact -- documentation
"
sphinx
"
,
#build artifact -- documentation
]
]
...
...
This diff is collapsed.
Click to expand it.
bob/devtools/scripts/build.py
+
4
−
3
View file @
8fa9a42c
...
@@ -12,7 +12,7 @@ import yaml
...
@@ -12,7 +12,7 @@ import yaml
from
.
import
bdt
from
.
import
bdt
from
..log
import
verbosity_option
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
get_rendered_metadata
,
get_parsed_recipe
,
make_conda_config
from
..constants
import
CONDA_BUILD_CONFIG
,
CONDA_RECIPE_APPEND
,
\
from
..constants
import
CONDA_BUILD_CONFIG
,
CONDA_RECIPE_APPEND
,
\
SERVER
,
MATPLOTLIB_RCDIR
,
BASE_CONDARC
SERVER
,
MATPLOTLIB_RCDIR
,
BASE_CONDARC
...
@@ -125,9 +125,10 @@ def build(recipe_dir, python, condarc, config, no_test, append_file,
...
@@ -125,9 +125,10 @@ def build(recipe_dir, python, condarc, config, no_test, append_file,
metadata
=
get_rendered_metadata
(
d
,
conda_config
)
metadata
=
get_rendered_metadata
(
d
,
conda_config
)
# checks we should actually build this recipe
# checks we should actually build this recipe
arch
=
conda_arch
()
if
should_skip_build
(
metadata
):
if
should_skip_build
(
metadata
):
logger
.
warn
(
'
Skipping UNSUPPORTED build of
"
%s
"
for py%s on %s
'
,
logger
.
warn
(
'
Skipping UNSUPPORTED build of
"
%s
"
for py%s on %s
'
,
d
,
python
.
replace
(
'
.
'
,
''
),
osname
()
)
d
,
python
.
replace
(
'
.
'
,
''
),
arch
)
return
0
return
0
# converts the metadata output into parsed yaml and continues the process
# 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,
...
@@ -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
'
,
logger
.
info
(
'
Building %s-%s-py%s (build: %d) for %s
'
,
rendered_recipe
[
'
package
'
][
'
name
'
],
rendered_recipe
[
'
package
'
][
'
name
'
],
rendered_recipe
[
'
package
'
][
'
version
'
],
python
.
replace
(
'
.
'
,
''
),
rendered_recipe
[
'
package
'
][
'
version
'
],
python
.
replace
(
'
.
'
,
''
),
build_number
,
osname
()
)
build_number
,
arch
)
if
not
dry_run
:
if
not
dry_run
:
from
conda_build.api
import
build
from
conda_build.api
import
build
build
(
d
,
config
=
conda_config
,
notest
=
no_test
)
build
(
d
,
config
=
conda_config
,
notest
=
no_test
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment