forked from conan-io/conan
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature: link editable packages (conan-io#4181)
* first try * fix includes * minor changes * more import fixes * fix more imports * short path as decorator * move SimplePaths to conans/paths/simple_paths.py * move back constants to conans.paths * moving folders to conans.paths * remove diffs caused just by ordering of imports * remove diffs caused just by ordering of imports * no diffs * no diff * move is_case_insensitive_os to conans.paths * add rm_conandir to windows imports * move package_layouts to paths * fix imports * move LINKED_FOLDER_SENTINEL to conans.paths.__init__.py * move 'get_package_layout' to 'SimplePaths' * get rid of PackageBaseLayout, go for duck typing * add parser for the file that will contain paths to includes, res, bins, libs,... * rename PackageUserLayout > PackageEditableLayout * interface for installed_as_editable info * test with a header only editable package * working example for header only lib * add test for a library with settings and options (still header only) * fix py2 test (declare string in source as unicode) * change import to avoid conans.tools one, so we need to mock a different function * make it compatible for win/linux * create the editable file sentinel using --editable argument in install command * add needed functions to simple_paths * add helper functions to simple paths * add package_metadata to new layouts * add missing named var (something went wrong merging from develop) * remove lines, not anymore there * add package metadata to users one * handle error: package folders needs a ConanFileReference * reorder imports * add missing import * reorder imports * if an editable package is dirty, log an error * moved parser to conan_file * move parsing for conan_package_layout closer to the ConanFile, we will be able to change it in the future * placeholders should be preprended with settings|options * fix typos, remove unused code * fix bug/typo * order imports * remove unreachable code * remove unreachable code * remove comments * move unittests to its folder * install as editable (requires the package to be already in the cache) * declare tests * refactor the editable hack: rely on member attribute * move imports * rename file to match class name * notify user about editable condition * gather logic together * make it editable from the very beginning, we don't care if it is editable or not * any error will require us to delete the editable flag * add tests * add tests related to editable package removal * rename tests * add test for other commands * add tests for conan commands * Update conans/test/command/editable_reference/create_editable_package_test.py Co-Authored-By: jgsogo <jgsogo@gmail.com> * add changes from review * move tests to final location * remove unused var * change variable name (it was a py conanfile) * don0t care about the output, but check something * remove comments * add tests installing an editable package (and installing its dependencies) * remove unused import * move cpp_info overrides to an standalone model * minor changes related to reviews * mode create/remove editables to client_cache class * renamed test folder * remove code related to 'install --editable' * link/unlink editable packages * consider these tests * handle remove command on editable * adapt message * removal is on its own test * check after unlink * add tests using linked packages * add tests for several commands * fix test related to utf8 and ordering * apply ordering * remove prints * putting path between quotes seems to solve windows issue * review (add more checks in tests) * function changed its name * no import in __init__.py * remove installed as editable * order is not guaranteed on info command output * no need for os.path.join * move EDITABLE before locking package layout * no different behaviour for update * new model for editable_cpp_info * check that cache file has more priority than the repo one * review * remove test, it is accepted behaviour now * review * revert change, this line is needed to pass tests in Windows * weird substitution is not needed, but path normalization is * inform about link removal * use conditional 'strict' arg when reusing cache for several TestClients * pass string to conan_api, build ConanFileReference inside it * add tests case for editable package without files, it will use package_info data * remove unused import * remove uneeded command * get the path to the conanfile.py from the argument to 'link' command inside the 'conan_api' * remove 'EditableCppInfo.create', rename loader ones to 'load(file...)' and 'loads(teext...)' * rename func argument * move CONAN_PACKAGE_LAYOUT_FILE to conans/paths * reorder variables inside file * renamed variables * pep8 * not using revisions in editable nodes, fix ordering issue * rename variables
- Loading branch information
Showing
42 changed files
with
1,647 additions
and
189 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
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
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
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
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
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
Oops, something went wrong.