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

Remove conan community from docs #1999

Merged
merged 2 commits into from
Jan 20, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions devtools/create_installer_packages.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Creating conan packages to install dev tools
============================================

One of the most useful features of Conan is to package executables like compilers or build tools and
distribute them in a controlled way to the team of developers. This way Conan helps not only with the
distribute them in a controlled way to the team of developers. This way Conan helps not only with the
graph of dependencies of the application itself, but also with all the ecosystem needed to generate the
project, making it really easy to control everything involved in the deployed application.

Expand Down Expand Up @@ -38,7 +38,7 @@ the ``nasm`` tool for building assembler:
name = "nasm"
version = "2.13.02"
license = "BSD-2-Clause"
url = "https://github.com/conan-community/conan-nasm-installer"
url = "https://github.com/conan-io/conan-center-index"
settings = "os", "arch"
description="Nasm for windows. Useful as a build_require."

Expand Down Expand Up @@ -91,9 +91,9 @@ Using the tool packages in other recipes
These kind of tools are not usually part of the application graph itself, they are needed only to build the library, so
you should usually declare them as :ref:`build requirements <build_requires>`, in the recipe itself or in a profile.

For example, there are many recipes that can take advantage of the ``nasm`` package we've seen above, like
For example, there are many recipes that can take advantage of the ``nasm`` package we've seen above, like
`flac <https://conan.io/center/flac?tab=recipe>`_ or `libx264 <https://conan.io/center/libx264?tab=recipe>`_
that are already available in `ConanCenter <https://conan.io/center/>`_. Those recipes will take advantage of ``nasm``
that are already available in `ConanCenter <https://conan.io/center/>`_. Those recipes will take advantage of ``nasm``
being in the PATH to run some assembly optimizations.


Expand All @@ -107,7 +107,7 @@ being in the PATH to run some assembly optimizations.

def build(self):
... # ``nasm.exe`` will be in the PATH here

def package_info(self):
self.cpp_info.libs = [...]

Expand All @@ -126,7 +126,7 @@ of adding the required paths to the corresponding environment variables:

Here we are telling Conan to create the package for the ``libx264`` for the ``host`` platform defined
in the profile ``profile_host`` file and to use the profile ``windows`` for all the build requirements
that are in the ``build`` context. In other words: in this example we are running a Windows machine
that are in the ``build`` context. In other words: in this example we are running a Windows machine
and we need a version of ``nasm`` compatible with this machine, so we are providing a ``windows`` profile
for the ``build`` context, and we are generating the library for the ``host`` platform which is declared
in the ``profile_host`` profile (read more about :ref:`build requires context <build_requires_context>`).
Expand Down Expand Up @@ -195,7 +195,7 @@ For example: Working in Windows with the ``nasm`` package we've already defined:

> NASM version 2.13.02 compiled on Dec 18 2019


#. You can deactivate the virtual environment with the *deactivate.bat* script

.. code-block:: bash
Expand Down
57 changes: 36 additions & 21 deletions howtos/other_languages_package_manager/go.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ You can just clone the following example repository:

.. code-block:: bash

$ git clone https://github.com/conan-community/conan-goserver-example
$ git clone https://github.com/conan-io/examples/tree/master/features/goserver

Or, alternatively, manually create the folder and copy the following files inside:

Expand Down Expand Up @@ -53,12 +53,12 @@ Create a *conanfile.txt*, with the following content:
:caption: *conanfile.txt*

[requires]
go-martini/1.0@lasote/stable
go-martini/1.0@

[imports]
src, * -> ./deps/src

Our project requires a package, **go-martini/1.0@lasote/stable**, and we indicate that all **src contents** from all our requirements have
Our project requires a package, **go-martini/1.0@**, and we indicate that all **src contents** from all our requirements have
to be copied to *./deps/src*.

The package go-martini depends on go-inject, so Conan will handle automatically the go-inject dependency.
Expand Down Expand Up @@ -109,24 +109,32 @@ Let's take a look at the *conanfile.py* of the **go inject** library:
.. code-block:: python
:caption: *conanfile.py*

from conans import ConanFile
import os
from conans import ConanFile, tools

class InjectConan(ConanFile):

class GoInjectConan(ConanFile):
name = "go-inject"
version = "1.0"
license = "MIT"
homepage = "https://github.com/codegangsta/inject"
no_copy_source = True

def source(self):
self.run("git clone https://github.com/codegangsta/inject.git")
self.run("cd inject && git checkout v1.0-rc1") # TAG v1.0-rc1
tools.get("https://github.com/codegangsta/inject/archive/v1.0-rc1.tar.gz",
sha256="22b265ea391a19de6961aaa8811ecfcc5bbe7979594e30663c610821cdad6c7b")

def package(self):
self.copy(pattern='*', dst='src/github.com/codegangsta/inject', src="inject", keep_path=True)
self.copy(pattern='*',
dst=os.path.join("src", "github.com", "codegangsta", "inject"),
src="inject-1.0-rc1", keep_path=True)


If you have read the :ref:`Building a hello world package <packaging_getting_started>`, the previous code may look quite simple to you.

We want to pack **version 1.0** of the **go inject** library, so the **version** variable is **"1.0"**. In the ``source()`` method, we
declare how to obtain the source code of the library, in this case just by cloning the github repository and making a checkout of the
**v1.0-rc1** tag. In the ``package()`` method, we are just copying all the sources to a folder named "src/github.com/codegangsta/inject".
declare how to obtain the source code of the library, in this case just by downloading **v1.0-rc1** tag.
In the ``package()`` method, we are just copying all the sources to a folder named "src/github.com/codegangsta/inject".

This way, we can keep importing the library in the same way:

Expand All @@ -138,35 +146,42 @@ We can export and upload the package to a remote and we are done:

.. code-block:: bash

$ conan export . lasote/stable # Or any other user/channel
$ conan upload go-inject/1.0@lasote/stable --all
$ conan create . # Or any other user/channel
$ conan upload go-inject/1.0@ --all

Now look at the **go martini** conanfile:

.. code-block:: python
:caption: *conanfile.py*

from conans import ConanFile
import os
from conans import ConanFile, tools

class InjectConan(ConanFile):

class GoMartiniConan(ConanFile):
name = "go-martini"
version = "1.0"
requires = 'go-inject/1.0@lasote/stable'
requires = "go-inject/1.0@"
license = "MIT"
homepage = "https://github.com/go-martini/martini"
no_copy_source = True

def source(self):
self.run("git clone https://github.com/go-martini/martini.git")
self.run("cd martini && git checkout v1.0") # TAG v1.0
tools.get("https://github.com/go-martini/martini/archive/v1.0.tar.gz",
sha256="3db135845d076d611f4420e0500e91625543a6b00dc9431cbe45d3571741281b")

def package(self):
self.copy(pattern='*', dst='src/github.com/go-martini/martini', src="martini", keep_path=True)
self.copy(pattern="*", dst=os.path.join("src", "github.com", "go-martini", "martini"),
src="martini-1.0", keep_path=True)


It is very similar. The only difference is the ``requires`` variable. It defines the **go-inject/1.0@lasote/stable** library, as a
It is very similar. The only difference is the ``requires`` variable. It defines the **go-inject/1.0@** library, as a
requirement.

.. code-block:: bash

$ conan export . lasote/stable # Or any other user/channel
$ conan upload go-martini/1.0@lasote/stable --all
$ conan create . # Or any other user/channel
$ conan upload go-martini/1.0@ --all

Now we are able to use them easily and without the problems of versioning with github checkouts.

Expand Down
14 changes: 7 additions & 7 deletions howtos/run_conan_in_docker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ It is always recommended to upgrade Conan from pip first:
.. code-block:: bash

$ sudo pip install conan --upgrade # We make sure we are running the latest Conan version
$ git clone https://github.com/conan-community/conan-openssl
$ cd conan-openssl
$ conan create . user/channel
$ git clone https://github.com/conan-io/conan-center-index
$ cd conan-center-index/recipes/openssl/1.x.x
$ conan create . 1.1.1i@


Sharing a local folder with a Docker container
Expand All @@ -50,8 +50,8 @@ You can share a local folder with your container, for example a project:

.. code-block:: bash

$ git clone https://github.com/conan-community/conan-openssl
$ cd conan-openssl
$ git clone https://github.com/conan-io/conan-center-index
$ cd conan-center-index/recipes/openssl/1.x.x
$ docker run -it -v$(pwd):/home/conan/project --rm conanio/gcc7 /bin/bash


Expand Down Expand Up @@ -90,8 +90,8 @@ Building and uploading a package along with all its missing dependencies for ``L

.. code-block:: bash

$ git clone https://github.com/conan-community/conan-openssl
$ cd conan-openssl
$ git clone https://github.com/conan-io/conan-center-index
$ cd conan-center-index/recipes/openssl/1.x.x
$ docker run -it -v$(pwd):/home/conan/project --rm conanio/gcc49-armv7hf /bin/bash

# Now we are running on the conangcc49-armv7hf container
Expand Down
4 changes: 2 additions & 2 deletions integrations/build_system/cmake/find_packages.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,5 @@ Then repeat for the library names with CONAN_LIBS_XXX and the paths where the li
self.copy("FindXXX.cmake", ".", ".")


.. _`conan's boost package`: https://github.com/conan-community/conan-boost.git
.. _`conan's zlib package`: https://github.com/conan-community/conan-zlib.git
.. _`conan's boost package`: https://github.com/conan-io/conan-center-index/tree/master/recipes/boost/all
.. _`conan's zlib package`: https://github.com/conan-io/conan-center-index/tree/master/recipes/zlib/1.2.11
12 changes: 8 additions & 4 deletions integrations/ci/jenkins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,15 @@ Example: Build a Conan package and upload it to Artifactory
In this example we will call Conan :ref:`test package<creating_and_testing_packages>` command to create a binary packages
and then upload it to Artifactory. We also upload the `build information`_:


.. code-block:: groovy

def artifactory_name = "artifactory"
def artifactory_repo = "conan-local"
def repo_url = 'https://github.com/conan-community/conan-zlib.git'
def repo_branch = "release/1.2.11"
def repo_url = 'https://github.com/conan-io/conan-center-index.git'
def repo_branch = "master"
def recipe_folder = "recipes/zlib/1.2.11"
def recipe_version = "1.2.11"

node {
def server = Artifactory.server artifactory_name
Expand All @@ -102,7 +104,9 @@ and then upload it to Artifactory. We also upload the `build information`_:
}

stage("Test recipe"){
client.run(command: "create")
dir (recipe_folder) {
client.run(command: "create . ${recipe_version}@")
}
}

stage("Upload packages"){
Expand Down
5 changes: 3 additions & 2 deletions integrations/cross_platform/buildroot.rst
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,9 @@ Now let's go to the *conan-zlib.mk* that contains the Zlib data:
CONAN_ZLIB_VERSION = 1.2.11
CONAN_ZLIB_LICENSE = Zlib
CONAN_ZLIB_LICENSE_FILES = licenses/LICENSE
CONAN_ZLIB_SITE = $(call github,conan-community,conan-zlib,92d34d0024d64a8f307237f211e43ab9952ef0a1)
CONAN_ZLIB_SITE = $(call github,conan-io,conan-center-index,134dd3b84d629d27ba3474e01b688e9c0f25b9c8)
CONAN_ZLIB_REFERENCE = zlib/$(CONAN_ZLIB_VERSION)@
CONAN_ZLIB_SUBDIR = recipes/zlib/1.2.11

$(eval $(conan-package))

Expand Down Expand Up @@ -235,4 +236,4 @@ If you are interested in knowing more, we have a complete `blog post`_ about Bui
.. _`Buildroot Project`: https://buildroot.org/
.. _`GPL-2.0-or-later`: https://spdx.org/licenses/GPL-2.0-or-later.html
.. _`blog post`: https://blog.conan.io/2019/08/27/Creating-small-Linux-images-with-Buildroot.html
.. _`pkg-conan.mk`: https://github.com/conan-community/buildroot/blob/feature/conan/package/pkg-conan.mk
.. _`pkg-conan.mk`: https://github.com/conan-io/examples/blob/features/buildroot/package/pkg-conan.mk
7 changes: 1 addition & 6 deletions reference/commands/output/user.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ List users per remote: :command:`conan user --json user.json`

{
"error":false,
"remotes":[
"remotes":[
{
"name":"conan-center",
"user_name":"danimtb",
Expand All @@ -41,11 +41,6 @@ List users per remote: :command:`conan user --json user.json`
"user_name":null,
"authenticated":false
},
{
"name":"conan-community",
"user_name":"danimtb",
"authenticated":true
},
{
"name":"the_remote",
"user_name":"foo",
Expand Down
6 changes: 3 additions & 3 deletions systems_cross_building/cross_building.rst
Original file line number Diff line number Diff line change
Expand Up @@ -591,13 +591,13 @@ RPI one:

.. code-block:: bash

git clone https://github.com/conan-community/conan-zlib.git
git clone https://github.com/conan-io/conan-center-index.git

- Call :command:`conan create` using the created profile.

.. code-block:: bash

$ cd conan-zlib && conan create . -pr:h ../android_21_arm_clang -pr:b default
$ cd conan-center-index/recipes/zlib/1.2.11 && conan create . 1.2.11@ -pr:h ../android_21_arm_clang -pr:b default

...
-- Build files have been written to: /tmp/conan-zlib/test_package/build/ba0b9dbae0576b9a23ce7005180b00e4fdef1198
Expand All @@ -623,7 +623,7 @@ integration section<darwin_toolchain>` in the documentation.
- Check the :ref:`Creating conan packages to install dev tools<create_installer_packages>` to learn
more about how to create Conan packages for tools.

- Check the `mingw-installer <https://github.com/conan-community/conan-mingw-installer/blob/master/conanfile.py>`_ build require recipe as an example of packaging a compiler.
- Check the `msys2 <https://github.com/conan-io/conan-center-index/blob/master/recipes/msys2/all/conanfile.py>`_ build require recipe as an example of packaging a compiler.



Expand Down