Skip to content

Commit

Permalink
Issue/5814 fix python_requires with short_paths enabled (#5841)
Browse files Browse the repository at this point in the history
* Added required = True to subparsers in order to print error message in Py2 and Py3.

* sync

* basic concurrent upload at reference level with futures

* revert changes

* add line

* Lock buggy urllib3 (#5808)

* app simplifying (#5806)

* Apply lockfile before updating downstream requires (#5771)

* apply graph_lock before looking for overrides

* first step: get rid of the warning

* cleaner if graph_lock is passed to the function

* only update requires upstream if no lockfile is applied

* fix tests

* Deprecation of CONAN_USERNAME and CONAN_CHANNEL: fix error message (#5756)

* if CONAN_USERNAME and CONAN_CHANNEL are deprecated, the error cannot recommend them

* update tests accordingly

* test client load() file method (#5815)

* no user/channel repr without _ (#5817)

* no user/channel repr without _

* minor fixes

* fix tests

* Remove py34 (#5820)

* fix upload package id (#5824)

* - update macOS, watchOS, tvOS, iOS version numbers (#5823)

* Refresh token client support.  (#5662)

* Refresh token client support. Missing tests. Missing migration

* public method

* WIP

* Refresh almost there

* Removed prints

* Try migrate

* Migration

* Add comment

* Refresh token flow following RFC recommentations

* Refresh ok

* review

* Remove traces

* Refactor capabilities

* Removed tmp file

* Review

* #5819 Show warning message for Python 3.4 (#5829)

* #5819 Show warning message for Python 3.4

- Add new warning message for python 3.4 which is no longer supported
- Added funcional tests to validate both python 3.4 and 2.x

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* #5819 Fix broken tests

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Add cpp_info.name to cmake and pkg_config generators (#5598)

* Add cpp_info.name to cmake generators

* Fix unit tests to mimic real behavior

* cmake_paths test

* add test for cmake generator

* Add cmake_find_package test

* fix test in py3

* Applied cpp_info.name to pkg_config generator

* check different name in pkg_config

* use pyreq short path if exists

* sync with develop

* revert change

* pass correct conanfile

* add test

* remove line

* clean test
  • Loading branch information
czoido authored and memsharded committed Oct 1, 2019
1 parent b2cbb3f commit 5acac3b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion conans/client/installer.py
Expand Up @@ -427,7 +427,7 @@ def _build_package(self, node, output, keep_build, remotes):
assert python_require.ref.revision is not None, \
"Installer should receive python_require.ref always"
complete_recipe_sources(self._remote_manager, self._cache,
conanfile, python_require.ref, remotes)
python_require.conanfile, python_require.ref, remotes)

builder = _PackageBuilder(self._cache, output, self._hook_manager, self._remote_manager)
pref = builder.build_package(node, keep_build, self._recorder, remotes)
Expand Down
26 changes: 26 additions & 0 deletions conans/test/functional/python_requires/python_requires_test.py
Expand Up @@ -576,6 +576,32 @@ class Lib(ConanFile):
self.assertIn("Same python_requires with different versions not allowed for a conanfile",
t.out)

def short_paths_test(self):
# https://github.com/conan-io/conan/issues/5814
client = TestClient(default_server_user=True)
conanfile = textwrap.dedent("""
from conans import ConanFile
class MyConanfileBase(ConanFile):
exports = "*.txt"
exports_sources = "*.h"
""")
client.save({"conanfile.py": conanfile,
"file.h": "header",
"other.txt": "text"})
client.run("create . Base/1.2@lasote/testing")

reuse = textwrap.dedent("""
from conans import python_requires
base = python_requires("Base/1.2@lasote/testing")
class PkgTest(base.MyConanfileBase):
short_paths = True
name = "consumer"
version = "1.0.0"
""")
client.save({"conanfile.py": reuse}, clean_first=True)
client.run("create . lasote/testing")
self.assertIn("consumer/1.0.0@lasote/testing: Created package revision", client.out)


class PythonRequiresNestedTest(unittest.TestCase):

Expand Down

0 comments on commit 5acac3b

Please sign in to comment.