Skip to content

Commit 49134fb

Browse files
committed
Merge branch 'master' into feature/491
2 parents 7b302e0 + 7a195fc commit 49134fb

File tree

12 files changed

+143
-84
lines changed

12 files changed

+143
-84
lines changed

‎changelog.rst‎

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,39 @@ Check https://github.com/conan-io/conan for issues and more details about develo
88

99
.. important::
1010

11-
Conan 1.4 shouldn't break any existing 1.0 recipe, or command line invocation. If it does, please report in github.
11+
Conan 1.5 shouldn't break any existing 1.0 recipe, or command line invocation. If it does, please report in github.
1212
Please read more :ref:`about Conan stability<stability>`.
1313

1414

15+
1.5.0 (27-June-2018)
16+
--------------------
17+
18+
- Feature: ``conan search <pkg-ref> -r=all`` now is able to search for binaries too in all remotes
19+
- Feature: Dependency graph improvements: ``build_requires`` are represented in the graph (visible in ``conan info``, also in the HTML graph). ``conan install`` and ``conan info`` commands shows extended information of the binaries status (represented in colors in HTML graph). The dependencies declaration order in recipes is respected (as long as it doesn't break the dependency graph order).
20+
- Feature: improved remote management, it is possible to get binaries from different remotes.
21+
- Feature: ``conan user`` command is now able to show authenticated users.
22+
- Feature: New ``pattern`` argument to ``tools.unzip()`` and ``tools.untargz`` functions, that allow efficient extraction of certain files only.
23+
- Feature : Added Manjaro support for ``SystemPackageTools``.
24+
- Feature: Added ``Macos`` ``version`` subsettings in the default ``settings.yml`` file, to account for the "min OSX version" configuration.
25+
- Feature: SCM helper argument to recursively clone submodules
26+
- Feature: SCM helper management of subfolder, allows using ``exports`` and ``exports_sources``, manage symlinks, and do not copy files that are ".gitignored". Also, works better in the local development flow.
27+
- Feature: Modifies user agent header to output the Conan client version and the Python version. Example: Conan/1.5.0 (Python 2.7.1)
28+
- Fix: The ``CMake`` helper now doesn't require a compiler input to deduce the default generator.
29+
- Fix: ``conan search <pattern>`` now works consistently in local cache and remotes.
30+
- Fix: proxy related environment variables are removed if ``conan.conf`` declares proxy configuration.
31+
- Fix: Fixed the parsing of invalid JSON when Microsoft ``vswhere`` tool outputs invalid non utf-8 text.
32+
- Fix: Applying ``winsdk`` and ``vcvars_ver`` to MSBuild and vcvars_command for VS 14 too.
33+
- Fix: Workspaces now support ``build_requires``
34+
- Fix: ``CMake`` helper now defines by default CMAKE_EXPORT_NO_PACKAGE_REGISTRY
35+
- Fix: settings constraints declared in recipes now don't error for single strings (instead of a list with a string element)
36+
- Fix: ``cmake_minimum_required()`` is now before ``project()`` in templates and examples.
37+
- Fix: CONAN_SYSREQUIRES_MODE=Disabled now doesn't try to udpate the system packages registry.
38+
- Bugfix: Fixed SCM origin path of windows folder (with backslashes)
39+
- Bugfix: Fixed SCM dictionary order when doing replacement.
40+
- Bugfix: Fixed auto-detection of apple-clang 10.0
41+
- Bugfix: Fixed bug when doing a ``conan search`` without registry file (just before installation)
42+
43+
1544
1.4.5 (22-June-2018)
1645
--------------------
1746

@@ -22,8 +51,8 @@ Check https://github.com/conan-io/conan for issues and more details about develo
2251
--------------------
2352

2453
- Bugfix: Fix link order with private requirements.
25-
- Bugfix: Removed duplicate `-std` flag in CMake < 3 or when the standard is not yet supported by `CMAKE_CXX_STANDARD`.
26-
- Bugfix: Check `scm` attribute to avoid breaking recipes with already defined one.
54+
- Bugfix: Removed duplicate ``-std`` flag in CMake < 3 or when the standard is not yet supported by ``CMAKE_CXX_STANDARD``.
55+
- Bugfix: Check ``scm`` attribute to avoid breaking recipes with already defined one.
2756
- Feature: Conan workspaces.
2857

2958

@@ -46,8 +75,8 @@ Check https://github.com/conan-io/conan for issues and more details about develo
4675
1.4.1 (31-May-2018)
4776
-------------------
4877

49-
- Bugfix: Solved issue with symlinks making recipes to fail with `self.copy`.
50-
- Bugfix: Fixed c++20 standard usage with modern compilers and the creation of the ``settings.yml`` containing the settings values.
78+
- Bugfix: Solved issue with symlinks making recipes to fail with ``self.copy``.
79+
- Bugfix: Fixed c++20 standard usage with modern compilers and the creation of the *settings.yml* containing the settings values.
5180
- Bugfix: Fixed error with cased directory names in Windows.
5281
- BugFix: Modified confusing warning message in the SCM tool when the remote couldn't be detected.
5382

‎conf.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@
3838
]
3939

4040
# The short X.Y version.
41-
version = "1.4"
41+
version = "1.5"
4242
# The full version, including alpha/beta/rc tags.
43-
release = u'1.4.5'
43+
release = u'1.5.0'
4444

4545
dir_path = os.path.dirname(os.path.realpath(__file__))
4646
if not os.path.exists(os.path.join(dir_path, "versions.json")):

‎deploy_gh_pages.py‎

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -70,31 +70,38 @@ def build_and_copy(branch, folder_name, versions_available, validate_links=False
7070
call("git commit --message 'committed version %s'" % folder_name, ignore_error=True)
7171

7272

73-
def deploy():
73+
def should_deploy():
7474
if not os.getenv("TRAVIS_BRANCH", None) == "master":
7575
print("Skipping deploy for not master branch")
76-
return
76+
return False
7777

7878
if os.getenv("TRAVIS_PULL_REQUEST", "") != "false":
7979
print("Deploy skipped, This is a PR in the main repository")
80-
return
80+
return False
8181

8282
if not os.getenv("GITHUB_API_KEY"):
8383
print("Deploy skipped, missing GITHUB_API_KEY. Is this a PR?")
84-
return
84+
return False
85+
86+
return True
8587

88+
89+
def deploy():
8690
call('git remote add origin-pages '
8791
'https://%s@github.com/conan-io/docs.git > /dev/null 2>&1' % os.getenv("GITHUB_API_KEY"))
8892
call('git push origin-pages gh-pages')
8993

9094

9195
if __name__ == "__main__":
92-
config_git()
93-
clean_gh_pages()
94-
95-
versions_dict = {"master": "1.4",
96-
"release/1.3.3": "1.3"}
97-
for branch, folder_name in versions_dict.items():
98-
build_and_copy(branch, folder_name, versions_dict, validate_links=branch == "master")
99-
100-
deploy()
96+
if should_deploy():
97+
config_git()
98+
clean_gh_pages()
99+
versions_dict = {"master": "1.4",
100+
"release/1.3.3": "1.3"}
101+
for branch, folder_name in versions_dict.items():
102+
build_and_copy(branch, folder_name, versions_dict, validate_links=branch == "master")
103+
104+
deploy()
105+
else:
106+
call("make html")
107+
call("make linkcheck")

‎howtos/custom_generators.rst‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ that file. The **name of the generator** itself will be taken from the class nam
4242
def content(self):
4343
return "whatever contents the generator produces"
4444
45-
This class is just included in a ``conanfile.py`` that must contain also a ``Conanfile`` class
45+
This class is just included in a ``conanfile.py`` that must contain also a ``ConanFile`` class
4646
that implements the package itself, with the name of the package, the version, etc. This
4747
class typically has no ``source()``, ``build()``, ``package()``, and even the ``package_info()`` method is
48-
overriden as it doesn't have to define any include paths or library paths.
48+
overridden as it doesn't have to define any include paths or library paths.
4949

5050
If you want to create a generator that creates more than one file, you can leave the ``filename()`` empty, and return a dictionary of
5151
filenames->contents in the ``content()`` method:

‎howtos/generic_ci_artifactory.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ However, you can gather and upload that information using other CI infrastructur
4646
$ rm /tmp/traces.log
4747
4848
5. Edit the `build_info.json` file to append ``name`` (build name), ``number`` (build number) and the ``started`` (started date) and
49-
any other field that you need according to the `Build Info json format <https://github.com/JFrogDev/build-info>`_.
49+
any other field that you need according to the `Build Info json format <https://github.com/jfrog/build-info>`_.
5050

5151
The ``started`` field has to be in the format: ``yyyy-MM-dd'T'HH:mm:ss.SSSZ``
5252

‎howtos/manage_shared_libraries/env_vars.rst‎

Lines changed: 33 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,9 @@ the right environment variable set, so they will be able to locate the (A) share
2626
Similarly if you use the :ref:`virtualenv generator<virtual_environment_generator>` and you
2727
activate it, you will get the paths needed to locate the shared libraries in your terminal.
2828

29-
3029
Example
3130
-------
3231

33-
3432
We are packaging a tool called ``toolA`` with a library and an executable that, for example, compress data.
3533

3634
The package offers two flavors, shared library or static library (embedded in the executable of the tool and
@@ -51,7 +49,6 @@ you will need to have the shared library available.
5149
options = {"shared": [True, False]}
5250
default_options = "shared=False"
5351
54-
5552
def build(self):
5653
# build your shared library
5754
@@ -67,40 +64,28 @@ you will need to have the shared library available.
6764
else:
6865
...
6966
70-
71-
def package_info(self):
72-
self.env_info.PATH.append(os.path.join(self.package_folder, "bin"))
73-
if self.options.shared:
74-
self.env_info.LD_LIBRARY_PATH.append(os.path.join(self.package_folder, "lib"))
75-
self.env_info.DYLD_LIBRARY_PATH.append(os.path.join(self.package_folder, "lib"))
76-
77-
78-
7967
Using the tool from a different package
8068
---------------------------------------
8169

8270
If we are creating now a package that uses the ``ToolA`` executable to compress some data. You can
83-
call directly to the ``toolA.exe``, the required environment variables to locate both the executable
84-
and the shared libraries are automatically available:
71+
execute directly ``toolA`` using RunEnvironment build helper to set the environment variables accordingly:
8572

8673
.. code-block:: python
8774
8875
import os
8976
from conans import tools, ConanFile
9077
9178
class PackageB(ConanFile):
92-
....
9379
name = "packageB"
9480
version = "1.0"
9581
requires = "toolA/1.0@myuser/stable"
9682
97-
9883
def build(self):
99-
...
100-
# we can call directly the ``toolA`` executable. the shared library will be located too
10184
exe_name = "toolA.exe" if self.settings.os == "Windows" else "toolA"
102-
self.run("%s --someparams" % exe_name)
103-
...
85+
env_build = RunEnvironment(self)
86+
with tools.environment_append(env_build.vars):
87+
self.run("%s --someparams" % exe_name)
88+
...
10489
10590
Building an application using the shared library from ``toolA``
10691
---------------------------------------------------------------
@@ -109,9 +94,8 @@ As we are building a final application, probably we will want to distribute it t
10994
shared library from the ``toolA``, so we can use the :ref:`Imports<imports_txt>` to import the required
11095
shared libraries to our user space.
11196

112-
**conanfile.txt**
113-
11497
.. code-block:: python
98+
:caption: *conanfile.txt*
11599
116100
[requires]
117101
toolA/1.0@myuser/stable
@@ -127,8 +111,7 @@ shared libraries to our user space.
127111
lib, *.dylib* -> ./bin # Copies all dylib files from packages lib folder to my "bin" folder
128112
lib, *.so* -> ./bin # Copies all dylib files from packages lib folder to my "bin" folder
129113
130-
131-
**In the terminal window and build the project:**
114+
Now you can build the project:
132115

133116
.. code-block:: bash
134117
@@ -148,9 +131,8 @@ In Linux you still need to set the ``LD_LIBRARY_PATH``, or in OSX, the ``DYLD_LI
148131
149132
$ cd bin && LD_LIBRARY_PATH=$(pwd) && ./mytool
150133
151-
152134
Using shared libraries from dependencies
153-
------------------------------------------
135+
----------------------------------------
154136

155137
If you are executing something that depends on shared libraries belonging to your dependencies, such shared libraries have to be found at
156138
runtime. In Windows, it is enough if the package added its binary folder to the system ``PATH``. In Linux and OSX, it is necessary that the
@@ -159,35 +141,25 @@ runtime. In Windows, it is enough if the package added its binary folder to the
159141
Security restrictions might apply in OSX
160142
(`read this thread <https://stackoverflow.com/questions/35568122/why-isnt-dyld-library-path-being-propagated-here>`_), so the
161143
``DYLD_LIBRARY_PATH`` environment variable is not directly transferred to the child process. In that case, you have to use it explicitly in
144+
<<<<<<< HEAD
162145
your conanfile.py:
146+
=======
147+
your *conanfile.py*:
148+
>>>>>>> master
163149

164150
.. code-block:: python
165151
166152
def test(self):
167153
# self.run('./myexe") # won't work, even if 'DYLD_LIBRARY_PATH' is in the env
168-
self.run('DYLD_LIBRARY_PATH=%s ./myexe" % os.environ['DYLD_LIBRARY_PATH'])
169-
154+
with tools.environment_append({"DYLD_LIBRARY_PATH": [self.deps_cpp_info["toolA"].lib_paths]}):
155+
self.run('DYLD_LIBRARY_PATH=%s ./myexe" % os.environ['DYLD_LIBRARY_PATH'])
170156
157+
Or you could use ``RunEnvironment`` helper described above.
171158
172-
Using the **virtualenv** generator
173-
----------------------------------
174-
175-
We could also use a :ref:`virtualenv generator<virtual_environment_generator>` to get the
176-
``toolA`` executable available:
177-
178-
**conanfile.txt**
179-
180-
.. code-block:: python
181-
182-
[requires]
183-
toolA/1.0@myuser/stable
184-
185-
[options]
186-
toolA:shared=True
187-
188-
[generators]
189-
virtualenv
159+
Using ``virtualrunenv`` generator
160+
---------------------------------
190161
162+
<<<<<<< HEAD
191163
192164
**In the terminal window:**
193165
@@ -207,8 +179,13 @@ the environment variables pointing to the "lib" and "bin" folders.
207179
208180
209181
**conanfile.txt**
182+
=======
183+
:ref:`virtualrunenv generator<virtual_run_environment_generator>` will set the environment variables ``PATH``, ``LD_LIBRARY_PATH``,
184+
``DYLD_LIBRARY_PATH`` pointing to *lib* and *bin* folders automatically.
185+
>>>>>>> master
210186
211187
.. code-block:: python
188+
:caption: *conanfile.txt*
212189
213190
[requires]
214191
toolA/1.0@myuser/stable
@@ -217,13 +194,20 @@ the environment variables pointing to the "lib" and "bin" folders.
217194
toolA:shared=True
218195
219196
[generators]
220-
virtualenv
221-
197+
virtualrunenv
222198
223-
**In the terminal window:**
199+
In the terminal window:
224200
225201
.. code-block:: bash
226202
203+
<<<<<<< HEAD
227204
conan install .
228205
source activate
229206
toolA --someparams
207+
=======
208+
$ conan install .
209+
$ source activate_run
210+
$ toolA --someparams
211+
# Only For Mac OS users to avoid restrictions:
212+
$ DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH toolA --someparams
213+
>>>>>>> master

‎reference/build_helpers/cmake.rst‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,8 @@ The CMake helper will automatically append some definitions based on your settin
155155
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+
156156
| CONAN_STD_CXX_FLAG | From setting ``cppstd``. Flag for compiler directly (for CMake < 3.1) |
157157
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+
158+
| CMAKE_EXPORT_NO_PACKAGE_REGISTRY | By default, disable the package registry |
159+
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+
158160

159161

160162

‎reference/commands/consumer/config.rst‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,20 @@ These are the special files and the rules applied to merge them:
7171
| config/conan.conf | Merges the variables, overriding only the declared variables |
7272
+--------------------------------+----------------------------------------------------------------------+
7373

74+
The file *remotes.txt* is the only file listed above which does not have a direct counterpart in
75+
the ``~/.conan`` folder. Its format is a list of entries, one on each line, with the form
76+
77+
.. code-block::
78+
79+
[remote name] [remote url] [bool]
80+
81+
where ``[bool]`` (either ``True`` or ``False``) indicates whether SSL should be used to verify that remote.
82+
7483
The local cache *registry.txt* file contains the remotes definitions, as well as the mapping from packages
75-
to remotes. In general it is not a good idea to add it to the installed files.
84+
to remotes. In general it is not a good idea to add it to the installed files. That being said, the remote
85+
definitions part of the *registry.txt* file uses the format required for *remotes.txt*, so you may find it
86+
provides a helpful starting point when writing a *remotes.txt* to be packaged in a Conan
87+
client configuration.
7688

7789
The specified URL will be stored in the ``general.config_install`` variable of the ``conan.conf`` file,
7890
so following calls to :command:`conan config install` command doesn't need to specify the URL.

‎reference/conanfile/attributes.rst‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -520,9 +520,9 @@ something like `C:/.conan/tmpdir`. All the folder layout in the conan cache is m
520520
This attribute will not have any effect in other OS, it will be discarded.
521521

522522
From Windows 10 (ver. 10.0.14393), it is possible to opt-in disabling the path limits. Check `this link
523-
<https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx#maxpath>`_ for more info.
524-
Latest python installers might offer to enable this while installing python. With this limit removed, the ``short_paths`` functionality is totally unnecessary.
525-
Please note that this only works with Python 3.6 and newer.
523+
<https://docs.microsoft.com/es-es/windows/desktop/FileIO/naming-a-file#maximum-path-length-limitation>`_ for more info.
524+
Latest python installers might offer to enable this while installing python. With this limit removed, the ``short_paths`` functionality is
525+
totally unnecessary. Please note that this only works with Python 3.6 and newer.
526526

527527
.. _no_copy_source:
528528

@@ -815,6 +815,9 @@ Used to clone/checkout a repository. It is a dictionary with the following possi
815815
- **username** (Optional, Defauted to ``None``): When present, it will be used as the login to authenticate with the remote.
816816
- **password** (Optional, Defauted to ``None``): When present, it will be used as the password to authenticate with the remote.
817817
- **verify_ssl** (Optional, Defaulted to ``True``): Verify SSL certificate of the specified **url**.
818+
- **submodule** (Optional, Defaulted to ``None``):
819+
- ``shallow``: Will sync the git submodules using ``submodule sync``
820+
- ``recursive``: Will sync the git submodules using ``submodule sync --recursive``
818821

819822
To know more about the usage of ``scm`` check:
820823

0 commit comments

Comments
 (0)