-
Notifications
You must be signed in to change notification settings - Fork 415
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow conda build to use the setuptools_scm generated version number (#…
…554) Summary: Unfortunately `conda build`'s `load_setup_py_data` does not properly resolve the version number from `setuptools_scm`. The workaround implemented here is to export this version number to an env variable that we can then substitute in to the jinja template of the `meta.yaml` file. This PR adds a simple shell script to make that easier, now the conda build process just amounts to calling `/build_conda.sh` from the `.conda/` directory and the version number gets automatically added. This also required some changes to `setup.py` to make sure the relative paths are properly resolved. Pull Request resolved: #554 Reviewed By: sdaulton Differential Revision: D23713807 Pulled By: Balandat fbshipit-source-id: fbd70166dde57f4f10e21dafdc57a1b5e19a9701
- Loading branch information
1 parent
b8879a3
commit c723fc1
Showing
4 changed files
with
22 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
# Copyright (c) Facebook, Inc. and its affiliates. | ||
# | ||
# This source code is licensed under the MIT license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
BOTORCH_VERSION="$(python ../setup.py --version)" | ||
export BOTORCH_VERSION | ||
|
||
conda build . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
[tool.setuptools_scm] | ||
|
||
[build-system] | ||
requires = ["setuptools>=34.4", "wheel", "setuptools_scm"] | ||
build-backend = "setuptools.build_meta" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters