Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/reuse python scm #3576

Merged
merged 8 commits into from Sep 21, 2018
Merged

Conversation

memsharded
Copy link
Member

@memsharded memsharded commented Sep 19, 2018

Changelog: Bugfix: Fixed scm replacement of the variable when exporting a conanfile.

@ghost ghost assigned memsharded Sep 19, 2018
@ghost ghost added the stage: review label Sep 19, 2018
@memsharded memsharded assigned lasote and unassigned memsharded Sep 20, 2018
@memsharded memsharded added this to the 1.8 milestone Sep 20, 2018
@ghost ghost assigned memsharded Sep 20, 2018
@@ -89,7 +90,33 @@ def _capture_export_scm_data(conanfile, conanfile_dir, destination_folder, outpu
# Generate the scm_folder.txt file pointing to the src_path
src_path = scm.get_repo_root()
save(scm_src_file, src_path.replace("\\", "/"))
scm_data.replace_in_file(os.path.join(destination_folder, "conanfile.py"))

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would feel a bit more comfortable extracting this to a replace_scm function. The overall together is a bit scary.

@lasote lasote merged commit a4d2233 into conan-io:develop Sep 21, 2018
@ghost ghost removed the stage: review label Sep 21, 2018
@memsharded memsharded deleted the feature/reuse_python_scm branch October 7, 2018 20:26
grisumbras pushed a commit to grisumbras/conan that referenced this pull request Dec 27, 2018
* adding test

* AST scm replace

* fixing replacement

* more testing and fixing bugs

* fixing tests

* refactor replace code to function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[python-requires] re-use scm variable for building from sources
2 participants