Initial commit
This commit is contained in:
commit
ff7778cf2a
|
@ -0,0 +1,125 @@
|
|||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
# Distribution / packaging
|
||||
.Python
|
||||
build/
|
||||
develop-eggs/
|
||||
dist/
|
||||
downloads/
|
||||
eggs/
|
||||
.eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
var/
|
||||
wheels/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
MANIFEST
|
||||
|
||||
# PyInstaller
|
||||
# Usually these files are written by a python script from a template
|
||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||
*.manifest
|
||||
*.spec
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
htmlcov/
|
||||
.tox/
|
||||
.coverage
|
||||
.coverage.*
|
||||
.cache
|
||||
nosetests.xml
|
||||
coverage.xml
|
||||
*.cover
|
||||
.hypothesis/
|
||||
.pytest_cache/
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
*.pot
|
||||
|
||||
# Django stuff:
|
||||
*.log
|
||||
local_settings.py
|
||||
db.sqlite3
|
||||
|
||||
# Flask stuff:
|
||||
instance/
|
||||
.webassets-cache
|
||||
|
||||
# Scrapy stuff:
|
||||
.scrapy
|
||||
|
||||
# Sphinx documentation
|
||||
docs/_build/
|
||||
|
||||
# PyBuilder
|
||||
target/
|
||||
|
||||
# Jupyter Notebook
|
||||
.ipynb_checkpoints
|
||||
|
||||
# pyenv
|
||||
.python-version
|
||||
|
||||
# celery beat schedule file
|
||||
celerybeat-schedule
|
||||
|
||||
# SageMath parsed files
|
||||
*.sage.py
|
||||
|
||||
# Environments
|
||||
.env
|
||||
.venv
|
||||
env/
|
||||
venv/
|
||||
ENV/
|
||||
env.bak/
|
||||
venv.bak/
|
||||
|
||||
# Spyder project settings
|
||||
.spyderproject
|
||||
.spyproject
|
||||
|
||||
# Rope project settings
|
||||
.ropeproject
|
||||
|
||||
# mkdocs documentation
|
||||
/site
|
||||
|
||||
# mypy
|
||||
.mypy_cache/
|
||||
|
||||
# Conan
|
||||
*.pyc
|
||||
.conan_*
|
||||
conan-*
|
||||
conanenv.json
|
||||
conanwrap.py
|
||||
conanbuildinfo.txt
|
||||
conaninfo.txt
|
||||
.conan-lib
|
||||
envwrap.py
|
||||
variants/tools
|
||||
**/test_package/build
|
||||
**/test_package/CMakeLists.txt
|
||||
activate.sh
|
||||
deactivate.sh
|
||||
activate.bat
|
||||
deactivate.bat
|
||||
build
|
||||
/profiles/status-mingw32-x86_64-gcc63-libstdcxx
|
||||
/profiles/status-mxe-mingw32-x86_64-gcc55-libstdcxx
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"python.pythonPath": "/usr/bin/python3",
|
||||
"python.linting.enabled": true
|
||||
}
|
|
@ -0,0 +1,373 @@
|
|||
Mozilla Public License Version 2.0
|
||||
==================================
|
||||
|
||||
1. Definitions
|
||||
--------------
|
||||
|
||||
1.1. "Contributor"
|
||||
means each individual or legal entity that creates, contributes to
|
||||
the creation of, or owns Covered Software.
|
||||
|
||||
1.2. "Contributor Version"
|
||||
means the combination of the Contributions of others (if any) used
|
||||
by a Contributor and that particular Contributor's Contribution.
|
||||
|
||||
1.3. "Contribution"
|
||||
means Covered Software of a particular Contributor.
|
||||
|
||||
1.4. "Covered Software"
|
||||
means Source Code Form to which the initial Contributor has attached
|
||||
the notice in Exhibit A, the Executable Form of such Source Code
|
||||
Form, and Modifications of such Source Code Form, in each case
|
||||
including portions thereof.
|
||||
|
||||
1.5. "Incompatible With Secondary Licenses"
|
||||
means
|
||||
|
||||
(a) that the initial Contributor has attached the notice described
|
||||
in Exhibit B to the Covered Software; or
|
||||
|
||||
(b) that the Covered Software was made available under the terms of
|
||||
version 1.1 or earlier of the License, but not also under the
|
||||
terms of a Secondary License.
|
||||
|
||||
1.6. "Executable Form"
|
||||
means any form of the work other than Source Code Form.
|
||||
|
||||
1.7. "Larger Work"
|
||||
means a work that combines Covered Software with other material, in
|
||||
a separate file or files, that is not Covered Software.
|
||||
|
||||
1.8. "License"
|
||||
means this document.
|
||||
|
||||
1.9. "Licensable"
|
||||
means having the right to grant, to the maximum extent possible,
|
||||
whether at the time of the initial grant or subsequently, any and
|
||||
all of the rights conveyed by this License.
|
||||
|
||||
1.10. "Modifications"
|
||||
means any of the following:
|
||||
|
||||
(a) any file in Source Code Form that results from an addition to,
|
||||
deletion from, or modification of the contents of Covered
|
||||
Software; or
|
||||
|
||||
(b) any new file in Source Code Form that contains any Covered
|
||||
Software.
|
||||
|
||||
1.11. "Patent Claims" of a Contributor
|
||||
means any patent claim(s), including without limitation, method,
|
||||
process, and apparatus claims, in any patent Licensable by such
|
||||
Contributor that would be infringed, but for the grant of the
|
||||
License, by the making, using, selling, offering for sale, having
|
||||
made, import, or transfer of either its Contributions or its
|
||||
Contributor Version.
|
||||
|
||||
1.12. "Secondary License"
|
||||
means either the GNU General Public License, Version 2.0, the GNU
|
||||
Lesser General Public License, Version 2.1, the GNU Affero General
|
||||
Public License, Version 3.0, or any later versions of those
|
||||
licenses.
|
||||
|
||||
1.13. "Source Code Form"
|
||||
means the form of the work preferred for making modifications.
|
||||
|
||||
1.14. "You" (or "Your")
|
||||
means an individual or a legal entity exercising rights under this
|
||||
License. For legal entities, "You" includes any entity that
|
||||
controls, is controlled by, or is under common control with You. For
|
||||
purposes of this definition, "control" means (a) the power, direct
|
||||
or indirect, to cause the direction or management of such entity,
|
||||
whether by contract or otherwise, or (b) ownership of more than
|
||||
fifty percent (50%) of the outstanding shares or beneficial
|
||||
ownership of such entity.
|
||||
|
||||
2. License Grants and Conditions
|
||||
--------------------------------
|
||||
|
||||
2.1. Grants
|
||||
|
||||
Each Contributor hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license:
|
||||
|
||||
(a) under intellectual property rights (other than patent or trademark)
|
||||
Licensable by such Contributor to use, reproduce, make available,
|
||||
modify, display, perform, distribute, and otherwise exploit its
|
||||
Contributions, either on an unmodified basis, with Modifications, or
|
||||
as part of a Larger Work; and
|
||||
|
||||
(b) under Patent Claims of such Contributor to make, use, sell, offer
|
||||
for sale, have made, import, and otherwise transfer either its
|
||||
Contributions or its Contributor Version.
|
||||
|
||||
2.2. Effective Date
|
||||
|
||||
The licenses granted in Section 2.1 with respect to any Contribution
|
||||
become effective for each Contribution on the date the Contributor first
|
||||
distributes such Contribution.
|
||||
|
||||
2.3. Limitations on Grant Scope
|
||||
|
||||
The licenses granted in this Section 2 are the only rights granted under
|
||||
this License. No additional rights or licenses will be implied from the
|
||||
distribution or licensing of Covered Software under this License.
|
||||
Notwithstanding Section 2.1(b) above, no patent license is granted by a
|
||||
Contributor:
|
||||
|
||||
(a) for any code that a Contributor has removed from Covered Software;
|
||||
or
|
||||
|
||||
(b) for infringements caused by: (i) Your and any other third party's
|
||||
modifications of Covered Software, or (ii) the combination of its
|
||||
Contributions with other software (except as part of its Contributor
|
||||
Version); or
|
||||
|
||||
(c) under Patent Claims infringed by Covered Software in the absence of
|
||||
its Contributions.
|
||||
|
||||
This License does not grant any rights in the trademarks, service marks,
|
||||
or logos of any Contributor (except as may be necessary to comply with
|
||||
the notice requirements in Section 3.4).
|
||||
|
||||
2.4. Subsequent Licenses
|
||||
|
||||
No Contributor makes additional grants as a result of Your choice to
|
||||
distribute the Covered Software under a subsequent version of this
|
||||
License (see Section 10.2) or under the terms of a Secondary License (if
|
||||
permitted under the terms of Section 3.3).
|
||||
|
||||
2.5. Representation
|
||||
|
||||
Each Contributor represents that the Contributor believes its
|
||||
Contributions are its original creation(s) or it has sufficient rights
|
||||
to grant the rights to its Contributions conveyed by this License.
|
||||
|
||||
2.6. Fair Use
|
||||
|
||||
This License is not intended to limit any rights You have under
|
||||
applicable copyright doctrines of fair use, fair dealing, or other
|
||||
equivalents.
|
||||
|
||||
2.7. Conditions
|
||||
|
||||
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
|
||||
in Section 2.1.
|
||||
|
||||
3. Responsibilities
|
||||
-------------------
|
||||
|
||||
3.1. Distribution of Source Form
|
||||
|
||||
All distribution of Covered Software in Source Code Form, including any
|
||||
Modifications that You create or to which You contribute, must be under
|
||||
the terms of this License. You must inform recipients that the Source
|
||||
Code Form of the Covered Software is governed by the terms of this
|
||||
License, and how they can obtain a copy of this License. You may not
|
||||
attempt to alter or restrict the recipients' rights in the Source Code
|
||||
Form.
|
||||
|
||||
3.2. Distribution of Executable Form
|
||||
|
||||
If You distribute Covered Software in Executable Form then:
|
||||
|
||||
(a) such Covered Software must also be made available in Source Code
|
||||
Form, as described in Section 3.1, and You must inform recipients of
|
||||
the Executable Form how they can obtain a copy of such Source Code
|
||||
Form by reasonable means in a timely manner, at a charge no more
|
||||
than the cost of distribution to the recipient; and
|
||||
|
||||
(b) You may distribute such Executable Form under the terms of this
|
||||
License, or sublicense it under different terms, provided that the
|
||||
license for the Executable Form does not attempt to limit or alter
|
||||
the recipients' rights in the Source Code Form under this License.
|
||||
|
||||
3.3. Distribution of a Larger Work
|
||||
|
||||
You may create and distribute a Larger Work under terms of Your choice,
|
||||
provided that You also comply with the requirements of this License for
|
||||
the Covered Software. If the Larger Work is a combination of Covered
|
||||
Software with a work governed by one or more Secondary Licenses, and the
|
||||
Covered Software is not Incompatible With Secondary Licenses, this
|
||||
License permits You to additionally distribute such Covered Software
|
||||
under the terms of such Secondary License(s), so that the recipient of
|
||||
the Larger Work may, at their option, further distribute the Covered
|
||||
Software under the terms of either this License or such Secondary
|
||||
License(s).
|
||||
|
||||
3.4. Notices
|
||||
|
||||
You may not remove or alter the substance of any license notices
|
||||
(including copyright notices, patent notices, disclaimers of warranty,
|
||||
or limitations of liability) contained within the Source Code Form of
|
||||
the Covered Software, except that You may alter any license notices to
|
||||
the extent required to remedy known factual inaccuracies.
|
||||
|
||||
3.5. Application of Additional Terms
|
||||
|
||||
You may choose to offer, and to charge a fee for, warranty, support,
|
||||
indemnity or liability obligations to one or more recipients of Covered
|
||||
Software. However, You may do so only on Your own behalf, and not on
|
||||
behalf of any Contributor. You must make it absolutely clear that any
|
||||
such warranty, support, indemnity, or liability obligation is offered by
|
||||
You alone, and You hereby agree to indemnify every Contributor for any
|
||||
liability incurred by such Contributor as a result of warranty, support,
|
||||
indemnity or liability terms You offer. You may include additional
|
||||
disclaimers of warranty and limitations of liability specific to any
|
||||
jurisdiction.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation
|
||||
---------------------------------------------------
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this
|
||||
License with respect to some or all of the Covered Software due to
|
||||
statute, judicial order, or regulation then You must: (a) comply with
|
||||
the terms of this License to the maximum extent possible; and (b)
|
||||
describe the limitations and the code they affect. Such description must
|
||||
be placed in a text file included with all distributions of the Covered
|
||||
Software under this License. Except to the extent prohibited by statute
|
||||
or regulation, such description must be sufficiently detailed for a
|
||||
recipient of ordinary skill to be able to understand it.
|
||||
|
||||
5. Termination
|
||||
--------------
|
||||
|
||||
5.1. The rights granted under this License will terminate automatically
|
||||
if You fail to comply with any of its terms. However, if You become
|
||||
compliant, then the rights granted under this License from a particular
|
||||
Contributor are reinstated (a) provisionally, unless and until such
|
||||
Contributor explicitly and finally terminates Your grants, and (b) on an
|
||||
ongoing basis, if such Contributor fails to notify You of the
|
||||
non-compliance by some reasonable means prior to 60 days after You have
|
||||
come back into compliance. Moreover, Your grants from a particular
|
||||
Contributor are reinstated on an ongoing basis if such Contributor
|
||||
notifies You of the non-compliance by some reasonable means, this is the
|
||||
first time You have received notice of non-compliance with this License
|
||||
from such Contributor, and You become compliant prior to 30 days after
|
||||
Your receipt of the notice.
|
||||
|
||||
5.2. If You initiate litigation against any entity by asserting a patent
|
||||
infringement claim (excluding declaratory judgment actions,
|
||||
counter-claims, and cross-claims) alleging that a Contributor Version
|
||||
directly or indirectly infringes any patent, then the rights granted to
|
||||
You by any and all Contributors for the Covered Software under Section
|
||||
2.1 of this License shall terminate.
|
||||
|
||||
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
|
||||
end user license agreements (excluding distributors and resellers) which
|
||||
have been validly granted by You or Your distributors under this License
|
||||
prior to termination shall survive termination.
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 6. Disclaimer of Warranty *
|
||||
* ------------------------- *
|
||||
* *
|
||||
* Covered Software is provided under this License on an "as is" *
|
||||
* basis, without warranty of any kind, either expressed, implied, or *
|
||||
* statutory, including, without limitation, warranties that the *
|
||||
* Covered Software is free of defects, merchantable, fit for a *
|
||||
* particular purpose or non-infringing. The entire risk as to the *
|
||||
* quality and performance of the Covered Software is with You. *
|
||||
* Should any Covered Software prove defective in any respect, You *
|
||||
* (not any Contributor) assume the cost of any necessary servicing, *
|
||||
* repair, or correction. This disclaimer of warranty constitutes an *
|
||||
* essential part of this License. No use of any Covered Software is *
|
||||
* authorized under this License except under this disclaimer. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 7. Limitation of Liability *
|
||||
* -------------------------- *
|
||||
* *
|
||||
* Under no circumstances and under no legal theory, whether tort *
|
||||
* (including negligence), contract, or otherwise, shall any *
|
||||
* Contributor, or anyone who distributes Covered Software as *
|
||||
* permitted above, be liable to You for any direct, indirect, *
|
||||
* special, incidental, or consequential damages of any character *
|
||||
* including, without limitation, damages for lost profits, loss of *
|
||||
* goodwill, work stoppage, computer failure or malfunction, or any *
|
||||
* and all other commercial damages or losses, even if such party *
|
||||
* shall have been informed of the possibility of such damages. This *
|
||||
* limitation of liability shall not apply to liability for death or *
|
||||
* personal injury resulting from such party's negligence to the *
|
||||
* extent applicable law prohibits such limitation. Some *
|
||||
* jurisdictions do not allow the exclusion or limitation of *
|
||||
* incidental or consequential damages, so this exclusion and *
|
||||
* limitation may not apply to You. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
8. Litigation
|
||||
-------------
|
||||
|
||||
Any litigation relating to this License may be brought only in the
|
||||
courts of a jurisdiction where the defendant maintains its principal
|
||||
place of business and such litigation shall be governed by laws of that
|
||||
jurisdiction, without reference to its conflict-of-law provisions.
|
||||
Nothing in this Section shall prevent a party's ability to bring
|
||||
cross-claims or counter-claims.
|
||||
|
||||
9. Miscellaneous
|
||||
----------------
|
||||
|
||||
This License represents the complete agreement concerning the subject
|
||||
matter hereof. If any provision of this License is held to be
|
||||
unenforceable, such provision shall be reformed only to the extent
|
||||
necessary to make it enforceable. Any law or regulation which provides
|
||||
that the language of a contract shall be construed against the drafter
|
||||
shall not be used to construe this License against a Contributor.
|
||||
|
||||
10. Versions of the License
|
||||
---------------------------
|
||||
|
||||
10.1. New Versions
|
||||
|
||||
Mozilla Foundation is the license steward. Except as provided in Section
|
||||
10.3, no one other than the license steward has the right to modify or
|
||||
publish new versions of this License. Each version will be given a
|
||||
distinguishing version number.
|
||||
|
||||
10.2. Effect of New Versions
|
||||
|
||||
You may distribute the Covered Software under the terms of the version
|
||||
of the License under which You originally received the Covered Software,
|
||||
or under the terms of any subsequent version published by the license
|
||||
steward.
|
||||
|
||||
10.3. Modified Versions
|
||||
|
||||
If you create software not governed by this License, and you want to
|
||||
create a new license for such software, you may create and use a
|
||||
modified version of this License if you rename the license and remove
|
||||
any references to the name of the license steward (except to note that
|
||||
such modified license differs from this License).
|
||||
|
||||
10.4. Distributing Source Code Form that is Incompatible With Secondary
|
||||
Licenses
|
||||
|
||||
If You choose to distribute Source Code Form that is Incompatible With
|
||||
Secondary Licenses under the terms of this version of the License, the
|
||||
notice described in Exhibit B of this License must be attached.
|
||||
|
||||
Exhibit A - Source Code Form License Notice
|
||||
-------------------------------------------
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
If it is not possible or desirable to put the notice in a particular
|
||||
file, then You may include the notice in a location (such as a LICENSE
|
||||
file in a relevant directory) where a recipient would be likely to look
|
||||
for such a notice.
|
||||
|
||||
You may add additional accurate notices of copyright ownership.
|
||||
|
||||
Exhibit B - "Incompatible With Secondary Licenses" Notice
|
||||
---------------------------------------------------------
|
||||
|
||||
This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||
defined by the Mozilla Public License, v. 2.0.
|
|
@ -0,0 +1,16 @@
|
|||
# status-conan
|
||||
|
||||
This repository serves as the repository for Conan package recipes and configuration.
|
||||
|
||||
## Introduction to Conan
|
||||
|
||||
> The open source, decentralized and multi-platform
|
||||
package manager to create and share all your native binaries.
|
||||
|
||||
[Conan](https://conan.io/) is an elegant and flexible way to describe, build and manage your whole software toolchain, from compiler, to libraries, to the application.
|
||||
|
||||
With it, you are able to declare a given library with certain options, and a consumer can specify the options it needs for its usage. If a library has already been built with those options, it will be present in the cache and will be used. Otherwise, Conan will look in a remote repository. If it still can't find it, it will build the library package, repeating the process for any packages required by the first package
|
||||
|
||||
## Status.im remote
|
||||
|
||||
The status.im remote lives at https://conan.status.im.
|
|
@ -0,0 +1,74 @@
|
|||
FROM ubuntu:16.04
|
||||
|
||||
ENV LANG en_US.UTF-8
|
||||
ENV LC_ALL en_US.UTF-8
|
||||
ENV LANGUAGE en_US.UTF-8
|
||||
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive \
|
||||
apt-get -q -y --no-install-recommends install \
|
||||
wget git file g++ cmake \
|
||||
python python3 python3-pip python3-setuptools python3-wheel \
|
||||
apt-transport-https locales && \
|
||||
locale-gen en_US.UTF-8 && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/man && \
|
||||
python3 -m pip install --upgrade pip && \
|
||||
pip3 install conan==1.9.0 && \
|
||||
conan --version
|
||||
|
||||
ARG GIT_COMMIT
|
||||
|
||||
RUN cd /opt && \
|
||||
git clone https://github.com/status-im/status-conan.git && \
|
||||
cd /opt/status-conan && \
|
||||
GIT_COMMIT=${GIT_COMMIT} \
|
||||
git reset --hard ${GIT_COMMIT} && \
|
||||
rm /usr/bin/python && \
|
||||
ln $(which python3) /usr/bin/python && \
|
||||
cd && rm -rf .git && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/man
|
||||
|
||||
WORKDIR /opt/status-conan
|
||||
ENV CONAN_LOG_RUN_TO_FILE 1
|
||||
ENV CONAN_LOGGING_LEVEL 10
|
||||
ENV CONAN_PRINT_RUN_COMMANDS 1
|
||||
ENV CONAN_NON_INTERACTIVE 1
|
||||
ENV CONAN_COLOR_DISPLAY 1
|
||||
ENV CONAN_SYSREQUIRES_SUDO 0
|
||||
ENV CONAN_TRACE_FILE /tmp/conan_trace.log
|
||||
ENV CONAN_VERBOSE_TRACEBACK 1
|
||||
ENV CONAN_LOGIN_USERNAME_STATUS_IM status
|
||||
|
||||
# Export, build and test MXE toolchain
|
||||
RUN conan create packages/mxetoolchain-x86_64-w64-mingw32/ mxetoolchain-x86_64-w64-mingw32/5.5.0-1@status-im/stable \
|
||||
-pr ./profiles/status-mingw32-x86_64
|
||||
|
||||
# Generate profiles from templates
|
||||
RUN conan install -g json mxetoolchain-x86_64-w64-mingw32/5.5.0-1@status-im/stable -pr ./profiles/status-mingw32-x86_64 && \
|
||||
python3 ./profiles/generate-profiles.py ./profiles conanbuildinfo.json
|
||||
|
||||
ARG QT_OPTIONS="webkit=False"
|
||||
|
||||
# Export, build and test Qt5 package
|
||||
RUN conan create packages/qt5-mxe/ qt5-mxe/5.11.2@status-im/stable \
|
||||
-pr ./profiles/status-mingw32-x86_64 \
|
||||
-o ${QT_OPTIONS} && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/man
|
||||
|
||||
RUN conan remote add --insert 0 status-im https://conan.status.im
|
||||
|
||||
ENV CONAN_LOGGING_LEVEL 50
|
||||
ENV CONAN_NON_INTERACTIVE 0
|
||||
|
||||
ADD Makefile-docker Makefile
|
||||
|
||||
# These are the UID and GID values used by Jenkins
|
||||
RUN addgroup --gid 1002 jenkins && \
|
||||
adduser --shell /bin/bash \
|
||||
--disabled-password --gecos "" \
|
||||
--uid 1001 --gid 1002 \
|
||||
--home /var/tmp/jenkins jenkins
|
||||
|
||||
LABEL source="https://github.com/status-im/status-conan/tree/master/docker" \
|
||||
description="Image for building Conan packages." \
|
||||
maintainer="pedro@status.im"
|
|
@ -0,0 +1,51 @@
|
|||
GIT_COMMIT = $(shell git rev-parse --short HEAD)
|
||||
|
||||
IMAGE_TAG = $(GIT_COMMIT)
|
||||
IMAGE_NAME = statusteam/linux-conan-ubuntu:$(IMAGE_TAG)
|
||||
|
||||
# This is a code for automatic help generator.
|
||||
# It supports ANSI colors and categories.
|
||||
# To add new item into help output, simply add comments
|
||||
# starting with '##'. To add category, use @category.
|
||||
GREEN := $(shell tput -Txterm setaf 2)
|
||||
WHITE := $(shell tput -Txterm setaf 7)
|
||||
YELLOW := $(shell tput -Txterm setaf 3)
|
||||
RESET := $(shell tput -Txterm sgr0)
|
||||
HELP_FUN = \
|
||||
%help; \
|
||||
while(<>) { push @{$$help{$$2 // 'options'}}, [$$1, $$3] if /^([a-zA-Z\-]+)\s*:.*\#\#(?:@([a-zA-Z\-]+))?\s(.*)$$/ }; \
|
||||
print "Usage: make [target]\n\n"; \
|
||||
for (sort keys %help) { \
|
||||
print "${WHITE}$$_:${RESET}\n"; \
|
||||
for (@{$$help{$$_}}) { \
|
||||
$$sep = " " x (32 - length $$_->[0]); \
|
||||
print " ${YELLOW}$$_->[0]${RESET}$$sep${GREEN}$$_->[1]${RESET}\n"; \
|
||||
}; \
|
||||
print "\n"; \
|
||||
}
|
||||
|
||||
help: ##@other Show this help
|
||||
@perl -e '$(HELP_FUN)' $(MAKEFILE_LIST)
|
||||
|
||||
build-qt: ##@build Build MXE toolchain and QT5 without webkit
|
||||
docker build \
|
||||
--build-arg="GIT_COMMIT=$(GIT_COMMIT)" \
|
||||
--label="qt5 commit=$(GIT_COMMIT)" \
|
||||
-t $(IMAGE_NAME) .
|
||||
|
||||
build-qt-with-webkit: ##@build Build MXE toolchain and QT5 with webkit
|
||||
docker build \
|
||||
--build-arg="GIT_COMMIT=$(GIT_COMMIT)" \
|
||||
--build-arg="QT_OPTIONS=webkit=True" \
|
||||
--label="qt5-webkit commit=$(GIT_COMMIT)" \
|
||||
-t $(IMAGE_NAME) .
|
||||
|
||||
push-%: ##@remote Push all built images to remote
|
||||
${MAKE} build-$*
|
||||
docker run -ti $(IMAGE_NAME) make push
|
||||
|
||||
dump-logs: ##@build Dump Conan trace logs
|
||||
docker run -ti $(IMAGE_NAME) cat /tmp/conan_trace.log
|
||||
|
||||
remove-image:
|
||||
docker rmi $(IMAGE_NAME)
|
|
@ -0,0 +1,3 @@
|
|||
push:
|
||||
conan upload -r status-im mxetoolchain-x86_64-w64-mingw32/5.5.0-1@status-im/stable --all --retry 5 --retry-wait 10
|
||||
conan upload -r status-im qt5-mxe/5.11.2@status-im/stable --all --retry 5 --retry-wait 10
|
|
@ -0,0 +1,3 @@
|
|||
# Description
|
||||
|
||||
This dockerfile is used to generate an image based on Ubuntu that will be used by Jenkins to build Conan packages.
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"name": "status-conan",
|
||||
"version": "1.0.0",
|
||||
"description": "Conan recipe repository",
|
||||
"main": "",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/status-im/status-conan.git"
|
||||
},
|
||||
"keywords": [
|
||||
"conan"
|
||||
],
|
||||
"author": "status-im",
|
||||
"license": "MPL-2.0",
|
||||
"bugs": {
|
||||
"url": "https://github.com/status-im/status-conan/issues"
|
||||
},
|
||||
"homepage": "https://github.com/status-im/status-conan#readme"
|
||||
}
|
|
@ -0,0 +1,132 @@
|
|||
from conans import ConanFile, tools
|
||||
from conans.tools import SystemPackageTool
|
||||
import glob, os
|
||||
|
||||
MXEGCCVERSION = "5.5.0"
|
||||
MXEGITSHA="a063f9b35279d83f692df0345d84147c0f23c992"
|
||||
STATUSTOOLCHAINVER="1"
|
||||
VERSION="%s-%s" % (MXEGCCVERSION, STATUSTOOLCHAINVER)
|
||||
|
||||
class MXEToolchainx8664w64mingw32Conan(ConanFile):
|
||||
name = "mxetoolchain-x86_64-w64-mingw32"
|
||||
url = "https://github.com/mxe/mxe"
|
||||
license = "MIT"
|
||||
version = VERSION
|
||||
settings = {"os": ["Windows"], "arch": ["x86_64"]}
|
||||
options = {"mxe_git_sha":"ANY"}
|
||||
default_options = "mxe_git_sha={0}".format(MXEGITSHA)
|
||||
description = "MXE cross-compiling toolchain for Windows"
|
||||
|
||||
def system_requirements(self):
|
||||
# https://mxe.cc/#requirements-debian
|
||||
pkgs = [
|
||||
"autoconf",
|
||||
"automake",
|
||||
"autopoint",
|
||||
"bash",
|
||||
"bison",
|
||||
"bzip2",
|
||||
"flex",
|
||||
"g++",
|
||||
"g++-multilib",
|
||||
"gettext",
|
||||
"git",
|
||||
"gperf",
|
||||
"intltool",
|
||||
"libc6-dev-i386",
|
||||
"libgdk-pixbuf2.0-dev",
|
||||
"libltdl-dev",
|
||||
"libssl-dev",
|
||||
"libtool-bin",
|
||||
"libxml-parser-perl",
|
||||
"make",
|
||||
"openssl",
|
||||
"p7zip-full",
|
||||
"patch",
|
||||
"perl",
|
||||
"pkg-config",
|
||||
"python",
|
||||
"ruby",
|
||||
"sed",
|
||||
"unzip",
|
||||
"wget",
|
||||
"xz-utils"
|
||||
]
|
||||
installer = SystemPackageTool()
|
||||
for pkg in pkgs:
|
||||
installer.install(pkg)
|
||||
|
||||
def target_tuple(self):
|
||||
return "{0}-w64-mingw32.shared".format(self.settings.arch)
|
||||
|
||||
def source(self):
|
||||
git = tools.Git(folder="mxe")
|
||||
git.clone("https://github.com/mxe/mxe.git")
|
||||
git.checkout(self.options.mxe_git_sha)
|
||||
|
||||
def build_id(self):
|
||||
self.info_build.options.mxe_git_sha = MXEGITSHA
|
||||
|
||||
def build(self):
|
||||
with tools.chdir("./mxe"):
|
||||
pkgs = ["mingw-w64", "cc", "zlib", "libpng", "openssl", "icu4c", "harfbuzz", "freetype", "pcre2", "pthreads"]
|
||||
for pkg in pkgs:
|
||||
self.run("unset LD_LIBRARY_PATH CC CXX CFLAGS CXXFLAGS LDFLAGS && make --jobs={2} MXE_TARGETS={0} {1}".format(self.target_tuple(), pkg, os.environ.get("STATUS_JOBS", "6")))
|
||||
|
||||
def package(self):
|
||||
toolchain = "mxe/usr"
|
||||
self.copy("%s-*" % self.target_tuple(), src=os.path.join(toolchain, "bin"), dst="bin", symlinks=False)
|
||||
self.copy("*.dll", src=os.path.join(toolchain, self.target_tuple(), "bin"), dst="bin", symlinks=False)
|
||||
self.copy("*", src=os.path.join(toolchain, "include"), dst="include", symlinks=False)
|
||||
self.copy("*", src=os.path.join(toolchain, self.target_tuple(), "include"), dst=os.path.join(self.target_tuple(), "include"), symlinks=False)
|
||||
self.copy("*", src=os.path.join(toolchain, self.target_tuple(), "lib"), dst=os.path.join(self.target_tuple(), "lib"), symlinks=False)
|
||||
self.copy("*", src=os.path.join(toolchain, "lib"), dst="lib", symlinks=False)
|
||||
self.copy("*", src=os.path.join(toolchain, "libexec"), dst="libexec", symlinks=False)
|
||||
self.copy("*", src=os.path.join(toolchain, self.target_tuple()), dst=self.target_tuple(), symlinks=False)
|
||||
|
||||
# MXE is generally not relocatable (https://github.com/mxe/mxe/issues/1700, https://github.com/mxe/mxe/issues/1902),
|
||||
# but we can get around this for the toolchain by relying on the fact that e.g. `gcc` will look for `as`
|
||||
# so we'll just create symlinks to the right binaries on the same directory and add that directory to bindirs.
|
||||
# This symlinks folder will only be added to the PATH using a profile, so that other MXE-based package
|
||||
# can depend on this one without inadvertently using the mingw64 gcc and therefore build Windows binaries instead of Linux ones.
|
||||
with tools.chdir(os.path.join(self.package_folder, "bin")):
|
||||
symlink_path = "symlinks"
|
||||
tools.mkdir(symlink_path)
|
||||
for target in glob.iglob("%s-*" % self.target_tuple()):
|
||||
link_name = target.replace("%s-" % self.target_tuple(), "", 1)
|
||||
if link_name == "ld":
|
||||
target="{0}-{1}".format(self.target_tuple(), link_name)
|
||||
link_name = "real-ld"
|
||||
link_path = os.path.join(symlink_path, link_name)
|
||||
if not os.path.exists(link_path) and not link_name in ["cmake", "cpack"]:
|
||||
os.symlink(os.path.join("..", target), link_path)
|
||||
if link_name == "real-ld" and not os.path.exists(os.path.join(symlink_path, "collect2")):
|
||||
os.symlink(os.path.join("../../libexec/gcc", self.target_tuple(), MXEGCCVERSION, "collect2"), os.path.join(symlink_path, "collect2"))
|
||||
|
||||
def package_info(self):
|
||||
self.cpp_info.includedirs = [
|
||||
os.path.join(self.package_folder, "include"),
|
||||
os.path.join(self.package_folder, self.target_tuple(), "include"),
|
||||
os.path.join(self.package_folder, "lib/gcc", self.target_tuple(), MXEGCCVERSION, "include")
|
||||
] # Ordered list of include paths
|
||||
self.cpp_info.resdirs = [] # Directories where resources, data, etc can be found
|
||||
self.cpp_info.libdirs = [
|
||||
os.path.join(self.package_folder, "lib/gcc", self.target_tuple(), VERSION),
|
||||
os.path.join(self.package_folder, self.target_tuple(), "lib"),
|
||||
os.path.join(self.package_folder, self.target_tuple(), "lib", self.target_tuple(), VERSION),
|
||||
os.path.join(self.package_folder, self.target_tuple(), "lib")
|
||||
]
|
||||
self.cpp_info.bindirs = [
|
||||
os.path.join(self.package_folder, "bin"),
|
||||
os.path.join(self.package_folder, "bin/symlinks")
|
||||
]
|
||||
self.cpp_info.sysroot = self.package_folder
|
||||
|
||||
# Add the compiler dir to the PATH
|
||||
self.env_info.PATH.append(os.path.join(self.package_folder, "bin"))
|
||||
self.env_info.CC = "%s-gcc" % self.target_tuple()
|
||||
self.env_info.CFLAGS = "-U_WIN32_WINNT -D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00 -D_UNICODE -DUNICODE -Os"
|
||||
self.env_info.CXX = "%s-g++" % self.target_tuple()
|
||||
self.env_info.CXXFLAGS = "-U_WIN32_WINNT -D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00 -D_UNICODE -DUNICODE -Os"
|
||||
self.env_info.WINDRES = "%s-windres" % self.target_tuple()
|
||||
self.env_info.STATUS_TRIPLE = self.target_tuple()
|
|
@ -0,0 +1,82 @@
|
|||
from conans import ConanFile, tools
|
||||
import os
|
||||
|
||||
class CBuffer(object):
|
||||
def __init__(self):
|
||||
self.lines = []
|
||||
|
||||
def write(self, buf):
|
||||
self.lines.append(buf.strip())
|
||||
|
||||
def clear(self):
|
||||
self.lines = []
|
||||
|
||||
def __str__(self):
|
||||
return "\n".join(self.lines)
|
||||
|
||||
class TestToolchain(ConanFile):
|
||||
settings = "os", "arch"
|
||||
requires = "mxetoolchain-x86_64-w64-mingw32/5.5.0-1@status-im/stable"
|
||||
buf = CBuffer()
|
||||
|
||||
def build(self):
|
||||
self.run("mkdir bin")
|
||||
self.run("{compiler} -v -o bin/hello.exe {cxxflags} -static-libgcc -static-libstdc++ {src}/hello.cpp".format(
|
||||
compiler=os.getenv("CXX"),
|
||||
cxxflags=os.getenv("CXXFLAGS"),
|
||||
src=self.source_folder),
|
||||
run_environment=True,
|
||||
output=self.buf)
|
||||
|
||||
def test(self):
|
||||
# Verify that we have a build that is usable on other machines (no hardcoded paths on binaries, etc)
|
||||
bindir=self.deps_cpp_info["mxetoolchain-x86_64-w64-mingw32"].bindirs[0]
|
||||
|
||||
for filename in os.listdir(bindir):
|
||||
path=os.path.join(bindir, filename)
|
||||
if os.path.islink(path):
|
||||
symlink_target=os.readlink(path)
|
||||
if os.path.isabs(symlink_target):
|
||||
print("A symlink linking to an absolute path is present in the binaries directory. This might cause issues when the package is installed on another machine. File: {0}".format(filename))
|
||||
exit(1)
|
||||
|
||||
lddbuf = CBuffer()
|
||||
self.run("ldd {bindir}/{windres}".format(bindir=bindir, windres=os.getenv("WINDRES")),
|
||||
run_environment=True,
|
||||
output=lddbuf)
|
||||
for line in lddbuf.lines:
|
||||
if "lib/ld.so" in line or "libfl.so.2" in line:
|
||||
print("An unexpected dynamic module is linked in {windres}: {line}".format(windres=os.getenv("WINDRES"), line=line))
|
||||
exit(1)
|
||||
|
||||
# ldd os.getenv("WINDRES") should return something like:
|
||||
# linux-vdso.so.1 => (0x00007ffeb5bca000)
|
||||
# libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f6afcfa9000)
|
||||
# libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6afcbdf000)
|
||||
# /lib64/ld-linux-x86-64.so.2 (0x00007f6afd1ad000)
|
||||
#
|
||||
# Example wrong output
|
||||
#
|
||||
# linux-vdso.so.1 (0x00007ffc2adc7000)
|
||||
# libgtk3-nocsd.so.0 => /usr/lib/x86_64-linux-gnu/libgtk3-nocsd.so.0 (0x00007fefae8dc000)
|
||||
# libfl.so.2 => /usr/lib/x86_64-linux-gnu/libfl.so.2 (0x00007fefae6da000)
|
||||
# libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fefae4d6000)
|
||||
# libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fefae0e5000)
|
||||
# libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fefadec6000)
|
||||
# /home/linuxbrew/.linuxbrew/lib/ld.so => /lib64/ld-linux-x86-64.so.2 (0x00007fefaeae3000)
|
||||
|
||||
triple=os.getenv("STATUS_TRIPLE")
|
||||
self.output.info(triple)
|
||||
if not [line for line in self.buf.lines if line.startswith("Target: %s" % triple)]:
|
||||
print("Target mismatch/not found (expected {0})".format(triple))
|
||||
exit(1)
|
||||
if not [line for line in self.buf.lines if line.startswith("COLLECT_GCC=%s-g++" % triple)]:
|
||||
print("%s-g++ not set in COLLECT_GCC" % triple)
|
||||
exit(1)
|
||||
if not [line for line in self.buf.lines if line.startswith("Thread model: win32")]:
|
||||
print("Thread model mismatch/not found (expected win32)")
|
||||
exit(1)
|
||||
if not [line for line in self.buf.lines if line.startswith("gcc version 5.5.0")]:
|
||||
print("Thread model mismatch")
|
||||
exit(1)
|
||||
self.buf.clear()
|
|
@ -0,0 +1,15 @@
|
|||
#include <iostream>
|
||||
#include <windows.h>
|
||||
#include <winuser.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
cout << "Hello, compiled with GCC " __VERSION__ << endl;
|
||||
if (0) {
|
||||
// Confirm that we can compile and link with this API from libuser32.a, since that has been a point of failure when cross-compiling Qt (5.11.2)
|
||||
ChangeWindowMessageFilterEx(NULL, 0, 0, NULL);
|
||||
}
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,120 @@
|
|||
from conans import ConanFile, tools
|
||||
from conans.tools import SystemPackageTool
|
||||
from conans.errors import ConanInvalidConfiguration
|
||||
import os, platform
|
||||
|
||||
VERSION="5.11.2"
|
||||
|
||||
class QtConan(ConanFile):
|
||||
name = "qt5-mxe"
|
||||
url = "https://github.com/mxe/mxe"
|
||||
license = "MIT"
|
||||
description = "MXE cross-compiled Qt5 for Windows"
|
||||
version = os.environ.get("CONAN_VERSION_OVERRIDE", VERSION)
|
||||
settings = "os", "arch", "build_type"
|
||||
options = { "webkit": [False, True] }
|
||||
default_options = "webkit=False"
|
||||
requires = "mxetoolchain-x86_64-w64-mingw32/5.5.0-1@status-im/stable"
|
||||
confFile = "qt.conf"
|
||||
|
||||
def get_triple(self):
|
||||
return "%s-w64-mingw32.shared" % self.settings.arch
|
||||
|
||||
def system_requirements(self):
|
||||
# https://mxe.cc/#requirements-debian
|
||||
pkgs = [
|
||||
"autoconf",
|
||||
"automake",
|
||||
"autopoint",
|
||||
"bash",
|
||||
"bison",
|
||||
"bzip2",
|
||||
"flex",
|
||||
"g++",
|
||||
"g++-multilib",
|
||||
"gettext",
|
||||
"git",
|
||||
"gperf",
|
||||
"intltool",
|
||||
"libc6-dev-i386",
|
||||
"libgdk-pixbuf2.0-dev",
|
||||
"libltdl-dev",
|
||||
"libssl-dev",
|
||||
"libtool-bin",
|
||||
"libxml-parser-perl",
|
||||
"make",
|
||||
"openssl",
|
||||
"p7zip-full",
|
||||
"patch",
|
||||
"perl",
|
||||
"pkg-config",
|
||||
"python",
|
||||
"ruby",
|
||||
"sed",
|
||||
"unzip",
|
||||
"wget",
|
||||
"xz-utils"
|
||||
]
|
||||
installer = SystemPackageTool()
|
||||
for pkg in pkgs:
|
||||
installer.install(pkg)
|
||||
|
||||
def configure(self):
|
||||
if self.settings.os != "Windows" or platform.system() != "Linux":
|
||||
raise ConanInvalidConfiguration("This package is only meant to cross-compile for Windows. It cannot compile for %s" % self.settings.os)
|
||||
|
||||
def source(self):
|
||||
git = tools.Git(folder="mxe")
|
||||
git.clone("https://github.com/mxe/mxe.git")
|
||||
git.checkout("a063f9b35279d83f692df0345d84147c0f23c992")
|
||||
|
||||
def build(self):
|
||||
with tools.chdir("./mxe"):
|
||||
pkgs = ["qtbase", "qtdeclarative", "qtgraphicaleffects", "qtimageformats", "qtlocation", "qtquickcontrols", "qtquickcontrols2", "qtsensors", "qtserialport", "qtsvg", "qttools", "qtwebchannel", "qttranslations"]
|
||||
if self.options.webkit:
|
||||
pkgs += ["qtmultimedia", "qtwebkit"]
|
||||
for pkg in pkgs:
|
||||
self.run("unset LD_LIBRARY_PATH CC CXX CFLAGS CXXFLAGS LDFLAGS && make --jobs={2} MXE_TARGETS={0} {1}".format(self.get_triple(), pkg, os.environ.get("STATUS_JOBS", "6")))
|
||||
|
||||
def package(self):
|
||||
toolchain = os.path.join("mxe/usr", self.get_triple())
|
||||
target_base = "gcc_64" if self.settings.arch == "x86_64" else "gcc_32"
|
||||
outputDir = ("bin", "include", "lib", "mkspecs", "Frameworks", "plugins", "qml", "translations")
|
||||
|
||||
# TODO: Right now the package contains all the dependencies, for simplicity. In the future, we'll want to break this out into a toolchain package and maybe individual packages that get imported into this package
|
||||
for l in ("png16", "glib-2.0-0", "jpeg-9", "sqlite3-0", "webp-5"):
|
||||
self.copy("lib{0}.dll.a".format(l), src=os.path.join(toolchain, "lib"), dst=os.path.join(target_base, "lib"))
|
||||
self.copy("lib{0}*.dll".format(l), src=os.path.join(toolchain, "bin"), dst=os.path.join(target_base, "bin"))
|
||||
self.copy("{0}*.dll".format(l), src=os.path.join(toolchain, "bin"), dst=os.path.join(target_base, "bin"))
|
||||
|
||||
source_base = os.path.join(toolchain, "qt5")
|
||||
tools.save(os.path.join(self.package_folder, target_base, "bin", self.confFile),
|
||||
"""
|
||||
[Paths]
|
||||
Prefix = ..
|
||||
""")
|
||||
|
||||
for d in outputDir:
|
||||
self.copy("*", src=os.path.join(source_base, d), dst=os.path.join(target_base, d))
|
||||
|
||||
if self.options.webkit:
|
||||
self.copy("QtWebProcess.exe", src=os.path.join(source_base, "bin"), dst=os.path.join(target_base, "bin"))
|
||||
|
||||
def package_info(self):
|
||||
base = "gcc_64" if self.settings.arch == "x86_64" else "gcc_32"
|
||||
baseFrameworks = ["Core", "Gui", "Qml", "Quick", "Network", "OpenGL", "Svg", "WebSockets", "Widgets"]
|
||||
frameworks = ["Positioning", "SerialPort", "WebChannel"]
|
||||
if self.options.webkit:
|
||||
baseFrameworks += ["WebKit", "WebKitWidgets"]
|
||||
frameworks += ["Sensors", "Sql"]
|
||||
frameworks += baseFrameworks
|
||||
includedirs = [os.path.join(base, "include")] + [os.path.join(base, "include/Qt%s" % a) for a in frameworks]
|
||||
|
||||
self.cpp_info.bindirs = [os.path.join(base, "bin")]
|
||||
self.cpp_info.builddirs = [os.path.join(base, "lib/cmake", "Qt5%s" % a) for a in frameworks]
|
||||
self.cpp_info.libdirs = [os.path.join(base, "lib")]
|
||||
self.cpp_info.libs = ["Qt5%s" % a for a in baseFrameworks]
|
||||
self.cpp_info.includedirs = includedirs
|
||||
|
||||
# Add the Qt5 binaries dir to the PATH
|
||||
self.env_info.PATH.append(os.path.join(base, "bin"))
|
|
@ -0,0 +1,11 @@
|
|||
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
|
||||
project(TestQt)
|
||||
|
||||
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
|
||||
conan_basic_setup()
|
||||
|
||||
set(CMAKE_SKIP_RPATH OFF)
|
||||
|
||||
add_executable(test_qt main.cpp)
|
||||
target_link_libraries(test_qt ${CONAN_LIBS})
|
||||
set_target_properties(test_qt PROPERTIES CXX_STANDARD 11 CXX_STANDARD_REQUIRED ON)
|
|
@ -0,0 +1,72 @@
|
|||
from conans import ConanFile, tools, CMake, AutoToolsBuildEnvironment
|
||||
import os
|
||||
|
||||
class CBuffer(object):
|
||||
def __init__(self):
|
||||
self.lines = []
|
||||
|
||||
def write(self, buf):
|
||||
self.lines.append(buf.strip())
|
||||
|
||||
def clear(self):
|
||||
self.lines = []
|
||||
|
||||
def __str__(self):
|
||||
return "\n".join(self.lines)
|
||||
|
||||
class QtTest(ConanFile):
|
||||
settings = "os", "compiler", "build_type", "arch"
|
||||
requires = "qt5-mxe/5.11.2@status-im/stable"
|
||||
generators = "cmake"
|
||||
options = { "webkit": [False, True] }
|
||||
default_options = "webkit=False"
|
||||
|
||||
def configure(self):
|
||||
self.options['qt5-mxe'].webkit = self.options.webkit
|
||||
|
||||
def build(self):
|
||||
with tools.pythonpath(self):
|
||||
env_build = AutoToolsBuildEnvironment(self)
|
||||
with tools.environment_append(env_build.vars):
|
||||
vcvars = ""
|
||||
if self.settings.compiler == "Visual Studio":
|
||||
vcvars = tools.vcvars_command(self.settings) + "&&"
|
||||
cmake = CMake(self, cmake_system_name=(str(self.settings.os) == "Windows"))
|
||||
self.run('{0}cmake "{1}" {2}'.format(vcvars, self.source_folder, cmake.command_line))
|
||||
self.run("{0}cmake --build . {1}".format(vcvars, cmake.build_config))
|
||||
|
||||
def test(self):
|
||||
# Verify that we have a build that is usable on other machines (no hardcoded paths on binaries, etc)
|
||||
lddbuf = CBuffer()
|
||||
self.run("ldd `which rcc`", run_environment=True, output=lddbuf)
|
||||
for line in lddbuf.lines:
|
||||
if "lib/ld.so" in line or ".linuxbrew" in line:
|
||||
print("An unexpected dynamic module is linked in rcc: {line}".format(line=line))
|
||||
exit(1)
|
||||
|
||||
# ldd rcc should return something like:
|
||||
# linux-vdso.so.1 => (0x00007ffee3736000)
|
||||
# libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fa171b42000)
|
||||
# libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fa1717c0000)
|
||||
# libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fa1714b7000)
|
||||
# libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fa1712a1000)
|
||||
# libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fa170ed7000)
|
||||
# /lib64/ld-linux-x86-64.so.2 (0x00007fa171d5f000)
|
||||
#
|
||||
# Example wrong output
|
||||
#
|
||||
# linux-vdso.so.1 (0x00007ffde25c9000)
|
||||
# libgtk3-nocsd.so.0 => /usr/lib/x86_64-linux-gnu/libgtk3-nocsd.so.0 (0x00007f64933ae000)
|
||||
# libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f649318f000)
|
||||
# libstdc++.so.6 => /home/linuxbrew/.linuxbrew/lib/libstdc++.so.6 (0x00007f6492dd2000)
|
||||
# libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f6492a34000)
|
||||
# libgcc_s.so.1 => /home/linuxbrew/.linuxbrew/lib/libgcc_s.so.1 (0x00007f649281d000)
|
||||
# libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f649242c000)
|
||||
# /home/linuxbrew/.linuxbrew/lib/ld.so => /lib64/ld-linux-x86-64.so.2 (0x00007f64935b5000)
|
||||
# libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f6492228000)
|
||||
|
||||
filebuf = CBuffer()
|
||||
self.run("file test_qt.exe", output=filebuf, cwd=os.path.join(self.build_folder, "bin"))
|
||||
if not (filebuf.lines[i] is "PE32+ executable(console) x86-64 (stripped to external PDB), for MS Windows" for i in filebuf.lines):
|
||||
print("Unexpected output file type: {0}".format(filebuf.lines))
|
||||
exit(1)
|
|
@ -0,0 +1,24 @@
|
|||
#include <QFile>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QNetworkReply>
|
||||
#include <QNetworkRequest>
|
||||
#include <QTimer>
|
||||
//#include <QDebug>
|
||||
|
||||
#include <QString>
|
||||
//#include <QtWebEngineWidgets/QWebEngineView>
|
||||
//#include <QtWebView>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
if (0)
|
||||
{
|
||||
//QtWebView::QWebView* view = new QtWebView::QWebView(NULL);
|
||||
//QWebEngineView *view = new QWebEngineView(NULL);
|
||||
//view->setGeometry(0,0,200,200);
|
||||
//view->load(QUrl("http://www.qt.io/"));
|
||||
//view->show();
|
||||
qCritical() << "Test";
|
||||
}
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,86 @@
|
|||
import glob, io, json, os, sys
|
||||
from conans.client.runner import ConanRunner
|
||||
|
||||
class CBuffer(object):
|
||||
def __init__(self):
|
||||
self.lines = []
|
||||
|
||||
def write(self, buf):
|
||||
self.lines.append(buf.strip())
|
||||
|
||||
def clear(self):
|
||||
self.lines = []
|
||||
|
||||
def __str__(self):
|
||||
return "\n".join(self.lines)
|
||||
|
||||
def generate_profile(profiles_path, template_fname, buidinfo_json_path):
|
||||
with open(buidinfo_json_path, 'r') as f:
|
||||
template_dict = json.load(f)
|
||||
old_environ = os.environ.copy()
|
||||
new_environ = os.environ.copy()
|
||||
try:
|
||||
dep_paths = template_dict['deps_env_info']['PATH']
|
||||
if dep_paths:
|
||||
new_environ["PATH"] = "{0}:{1}".format(':'.join(dep_paths), new_environ["PATH"])
|
||||
os.environ.update(new_environ)
|
||||
|
||||
generate_expanded_profile_from_in_file(profiles_path, template_fname)
|
||||
finally:
|
||||
os.environ.clear()
|
||||
os.environ.update(old_environ)
|
||||
|
||||
def generate_expanded_profile_from_in_file(profiles_path, f):
|
||||
nf = f.replace(".in", "")
|
||||
|
||||
profile_path = os.path.join(profiles_path, f)
|
||||
print("Processing {0}...".format(profile_path))
|
||||
with open(profile_path, "r") as pf:
|
||||
data = pf.readlines()
|
||||
newlines = []
|
||||
|
||||
# get CC binary
|
||||
cc = [i.split("CC=")[1] for i in data if i.startswith("CC=")][0].replace("ccache ", "").strip()
|
||||
cc_output = CBuffer()
|
||||
cc_cmd = "{0} -print-sysroot".format(cc)
|
||||
runner = ConanRunner()
|
||||
if not runner(cc_cmd, output=cc_output) is 0:
|
||||
print("Failed to run {0} for {1}!\n{2}".format(cc_cmd, f, cc_output.lines))
|
||||
return False
|
||||
|
||||
sysroot = os.path.abspath(cc_output.lines[0].strip()) if cc_output.lines else None
|
||||
cc_output.clear()
|
||||
|
||||
triple = [i.split("_STATUS_GCC_TRIPLE_NAME=")[1] for i in data if i.startswith("_STATUS_GCC_TRIPLE_NAME=")]
|
||||
if triple:
|
||||
triple = triple[0].strip()
|
||||
|
||||
ccpath = os.path.abspath(os.path.join(sysroot, os.pardir))
|
||||
if not os.path.isdir(os.path.join(ccpath, triple)):
|
||||
ccpath = os.path.abspath(os.path.join(sysroot, os.pardir, os.pardir))
|
||||
triple_sysrootpath = os.path.normpath(os.path.abspath(os.path.join(sysroot, "usr", triple)))
|
||||
|
||||
flags = " --sysroot=" + sysroot if sysroot else ""
|
||||
|
||||
for line in data:
|
||||
line = line.rstrip()
|
||||
if line.startswith("LDFLAGS="):
|
||||
newlines.append("LDFLAGS={0}{1}".format(line.strip().split("LDFLAGS=")[1], flags))
|
||||
elif line.startswith("_STATUS_TRIPLE_PATH="):
|
||||
path=os.path.normpath(os.path.join(triple_sysrootpath, "../../..", line.strip().split("_STATUS_TRIPLE_PATH=")[1]))
|
||||
newlines.append("_STATUS_TRIPLE_PATH={0}".format(path))
|
||||
elif line.startswith("_STATUS_TRIPLE_SYSROOTPATH="):
|
||||
newlines.append("_STATUS_TRIPLE_SYSROOTPATH={0}".format(triple_sysrootpath))
|
||||
else:
|
||||
newlines.append(line)
|
||||
|
||||
with open(os.path.join(profiles_path, nf), "w") as nfp:
|
||||
nfp.write("\n".join(newlines) + "\n")
|
||||
|
||||
return True
|
||||
|
||||
if __name__ == '__main__':
|
||||
profiles_path = os.path.abspath(sys.argv[1])
|
||||
buidinfo_json_path = os.path.abspath(sys.argv[2])
|
||||
for template_fname in glob.glob("{0}/status-*.in".format(profiles_path)):
|
||||
generate_profile(profiles_path, template_fname, buidinfo_json_path)
|
|
@ -0,0 +1,15 @@
|
|||
[settings]
|
||||
compiler=gcc
|
||||
compiler.version=5.3
|
||||
compiler.libcxx=libstdc++11
|
||||
os_build=Linux
|
||||
arch_build=x86_64
|
||||
os=Linux
|
||||
arch=x86_64
|
||||
build_type=Release
|
||||
|
||||
[env]
|
||||
CC=gcc
|
||||
CXX=g++
|
||||
LC_CTYPE=C
|
||||
LC_ALL=C
|
|
@ -0,0 +1,8 @@
|
|||
include(default)
|
||||
|
||||
[settings]
|
||||
os=Windows
|
||||
arch=x86_64
|
||||
os_build=Linux
|
||||
arch_build=x86_64
|
||||
build_type=Release
|
|
@ -0,0 +1,43 @@
|
|||
_STATUS_GCC_TRIPLE_NAME=x86_64-w64-mingw32.shared
|
||||
_STATUS_TRIPLE_PATH=
|
||||
|
||||
[settings]
|
||||
compiler=gcc
|
||||
compiler.version=5.5
|
||||
compiler.libcxx=libstdc++
|
||||
compiler.threads=win32
|
||||
os=Windows
|
||||
arch=x86_64
|
||||
os_build=Linux
|
||||
arch_build=x86_64
|
||||
build_type=Release
|
||||
|
||||
[build_requires]
|
||||
mxetoolchain-x86_64-w64-mingw32/5.5.0-1@status-im/stable
|
||||
|
||||
[env]
|
||||
PATH=[$_STATUS_TRIPLE_PATH/bin/symlinks]
|
||||
STATUS_TRIPLE=$_STATUS_GCC_TRIPLE_NAME
|
||||
STATUS_TRIPLE_PATH=$_STATUS_TRIPLE_PATH
|
||||
CC=x86_64-w64-mingw32.shared-gcc
|
||||
CXX=x86_64-w64-mingw32.shared-g++
|
||||
CFLAGS=-U_WIN32_WINNT -D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00 -D_UNICODE -DUNICODE -Os
|
||||
CXXFLAGS=-U_WIN32_WINNT -D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00 -D_UNICODE -DUNICODE -Os
|
||||
LDFLAGS=-L$_STATUS_TRIPLE_PATH/lib
|
||||
LC_CTYPE=C
|
||||
LC_ALL=C
|
||||
CCACHE_SLOPPINESS=pch_defines,time_macros
|
||||
AR=$_STATUS_GCC_TRIPLE_NAME-ar
|
||||
DLLTOOL=$_STATUS_GCC_TRIPLE_NAME-dlltool
|
||||
GENLIB=$_STATUS_GCC_TRIPLE_NAME-genlib
|
||||
NM=$_STATUS_GCC_TRIPLE_NAME-nm
|
||||
RANLIB=$_STATUS_GCC_TRIPLE_NAME-ranlib
|
||||
WINDRES=$_STATUS_GCC_TRIPLE_NAME-windres
|
||||
STRIP=$_STATUS_GCC_TRIPLE_NAME-strip
|
||||
|
||||
CONAN_CMAKE_GENERATOR=Ninja
|
||||
CONAN_CMAKE_FIND_ROOT_PATH=$_STATUS_TRIPLE_PATH/bin
|
||||
CONAN_CMAKE_SYSTEM_NAME=Windows
|
||||
CONAN_CMAKE_C_COMPILER=x86_64-w64-mingw32.shared-gcc
|
||||
CONAN_CMAKE_CXX_COMPILER=x86_64-w64-mingw32.shared-g++
|
||||
#CONAN_CMAKE_TOOLCHAIN_FILE=
|
|
@ -0,0 +1,407 @@
|
|||
[MASTER]
|
||||
|
||||
# Specify a configuration file.
|
||||
#rcfile=
|
||||
|
||||
# Python code to execute, usually for sys.path manipulation such as
|
||||
# pygtk.require().
|
||||
#init-hook=
|
||||
|
||||
# Add files or directories to the blacklist. They should be base names, not
|
||||
# paths.
|
||||
ignore=CVS
|
||||
|
||||
# Add files or directories matching the regex patterns to the blacklist. The
|
||||
# regex matches against base names, not paths.
|
||||
ignore-patterns=
|
||||
|
||||
# Pickle collected data for later comparisons.
|
||||
persistent=yes
|
||||
|
||||
# List of plugins (as comma separated values of python modules names) to load,
|
||||
# usually to register additional checkers.
|
||||
load-plugins=
|
||||
|
||||
# Use multiple processes to speed up Pylint.
|
||||
jobs=1
|
||||
|
||||
# Allow loading of arbitrary C extensions. Extensions are imported into the
|
||||
# active Python interpreter and may run arbitrary code.
|
||||
unsafe-load-any-extension=no
|
||||
|
||||
# A comma-separated list of package or module names from where C extensions may
|
||||
# be loaded. Extensions are loading into the active Python interpreter and may
|
||||
# run arbitrary code
|
||||
extension-pkg-whitelist=
|
||||
|
||||
# Allow optimization of some AST trees. This will activate a peephole AST
|
||||
# optimizer, which will apply various small optimizations. For instance, it can
|
||||
# be used to obtain the result of joining multiple strings with the addition
|
||||
# operator. Joining a lot of strings can lead to a maximum recursion error in
|
||||
# Pylint and this flag can prevent that. It has one side effect, the resulting
|
||||
# AST will be different than the one from reality. This option is deprecated
|
||||
# and it will be removed in Pylint 2.0.
|
||||
optimize-ast=no
|
||||
|
||||
|
||||
[MESSAGES CONTROL]
|
||||
|
||||
# Only show warnings with the listed confidence levels. Leave empty to show
|
||||
# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED
|
||||
confidence=
|
||||
|
||||
# Enable the message, report, category or checker with the given id(s). You can
|
||||
# either give multiple identifier separated by comma (,) or put this option
|
||||
# multiple time (only on the command line, not in the configuration file where
|
||||
# it should appear only once). See also the "--disable" option for examples.
|
||||
#enable=
|
||||
|
||||
# Disable the message, report, category or checker with the given id(s). You
|
||||
# can either give multiple identifiers separated by comma (,) or put this
|
||||
# option multiple times (only on the command line, not in the configuration
|
||||
# file where it should appear only once).You can also use "--disable=all" to
|
||||
# disable everything first and then reenable specific checks. For example, if
|
||||
# you want to run only the similarities checker, you can use "--disable=all
|
||||
# --enable=similarities". If you want to run only the classes checker, but have
|
||||
# no Warning level messages displayed, use"--disable=all --enable=classes
|
||||
# --disable=W"
|
||||
disable=import-star-module-level,old-octal-literal,oct-method,print-statement,unpacking-in-except,parameter-unpacking,backtick,old-raise-syntax,old-ne-operator,long-suffix,dict-view-method,dict-iter-method,metaclass-assignment,next-method-called,raising-string,indexing-exception,raw_input-builtin,long-builtin,file-builtin,execfile-builtin,coerce-builtin,cmp-builtin,buffer-builtin,basestring-builtin,apply-builtin,filter-builtin-not-iterating,using-cmp-argument,useless-suppression,range-builtin-not-iterating,suppressed-message,no-absolute-import,old-division,cmp-method,reload-builtin,zip-builtin-not-iterating,intern-builtin,unichr-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,input-builtin,round-builtin,hex-method,nonzero-method,map-builtin-not-iterating,multiple-imports,cyclic-import,missing-docstring
|
||||
|
||||
|
||||
[REPORTS]
|
||||
|
||||
# Set the output format. Available formats are text, parseable, colorized, msvs
|
||||
# (visual studio) and html. You can also give a reporter class, eg
|
||||
# mypackage.mymodule.MyReporterClass.
|
||||
output-format=text
|
||||
|
||||
# Put messages in a separate file for each module / package specified on the
|
||||
# command line instead of printing them on stdout. Reports (if any) will be
|
||||
# written in a file name "pylint_global.[txt|html]". This option is deprecated
|
||||
# and it will be removed in Pylint 2.0.
|
||||
files-output=no
|
||||
|
||||
# Tells whether to display a full report or only the messages
|
||||
reports=no
|
||||
|
||||
# Python expression which should return a note less than 10 (10 is the highest
|
||||
# note). You have access to the variables errors warning, statement which
|
||||
# respectively contain the number of errors / warnings messages and the total
|
||||
# number of statements analyzed. This is used by the global evaluation report
|
||||
# (RP0004).
|
||||
evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
|
||||
|
||||
# Template used to display messages. This is a python new-style format string
|
||||
# used to format the message information. See doc for all details
|
||||
#msg-template=
|
||||
|
||||
|
||||
[TYPECHECK]
|
||||
|
||||
# Tells whether missing members accessed in mixin class should be ignored. A
|
||||
# mixin class is detected if its name ends with "mixin" (case insensitive).
|
||||
ignore-mixin-members=yes
|
||||
|
||||
# List of module names for which member attributes should not be checked
|
||||
# (useful for modules/projects where namespaces are manipulated during runtime
|
||||
# and thus existing member attributes cannot be deduced by static analysis. It
|
||||
# supports qualified module names, as well as Unix pattern matching.
|
||||
ignored-modules=
|
||||
|
||||
# List of class names for which member attributes should not be checked (useful
|
||||
# for classes with dynamically set attributes). This supports the use of
|
||||
# qualified names.
|
||||
ignored-classes=optparse.Values,thread._local,_thread._local
|
||||
|
||||
# List of members which are set dynamically and missed by pylint inference
|
||||
# system, and so shouldn't trigger E1101 when accessed. Python regular
|
||||
# expressions are accepted.
|
||||
generated-members=
|
||||
|
||||
# List of decorators that produce context managers, such as
|
||||
# contextlib.contextmanager. Add to this list to register other decorators that
|
||||
# produce valid context managers.
|
||||
contextmanager-decorators=contextlib.contextmanager
|
||||
|
||||
|
||||
[SPELLING]
|
||||
|
||||
# Spelling dictionary name. Available dictionaries: none. To make it working
|
||||
# install python-enchant package.
|
||||
spelling-dict=
|
||||
|
||||
# List of comma separated words that should not be checked.
|
||||
spelling-ignore-words=
|
||||
|
||||
# A path to a file that contains private dictionary; one word per line.
|
||||
spelling-private-dict-file=
|
||||
|
||||
# Tells whether to store unknown words to indicated private dictionary in
|
||||
# --spelling-private-dict-file option instead of raising a message.
|
||||
spelling-store-unknown-words=no
|
||||
|
||||
|
||||
[FORMAT]
|
||||
|
||||
# Maximum number of characters on a single line.
|
||||
max-line-length=180
|
||||
|
||||
# Regexp for a line that is allowed to be longer than the limit.
|
||||
ignore-long-lines=^\s*(# )?<?https?://\S+>?$
|
||||
|
||||
# Allow the body of an if to be on the same line as the test if there is no
|
||||
# else.
|
||||
single-line-if-stmt=no
|
||||
|
||||
# List of optional constructs for which whitespace checking is disabled. `dict-
|
||||
# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
|
||||
# `trailing-comma` allows a space between comma and closing bracket: (a, ).
|
||||
# `empty-line` allows space-only lines.
|
||||
no-space-check=trailing-comma,dict-separator
|
||||
|
||||
# Maximum number of lines in a module
|
||||
max-module-lines=1000
|
||||
|
||||
# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
|
||||
# tab).
|
||||
indent-string=' '
|
||||
|
||||
# Number of spaces of indent required inside a hanging or continued line.
|
||||
indent-after-paren=2
|
||||
|
||||
# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
|
||||
expected-line-ending-format=
|
||||
|
||||
|
||||
[BASIC]
|
||||
|
||||
# Good variable names which should always be accepted, separated by a comma
|
||||
good-names=i,j,k,ex,Run,_,x,y,e
|
||||
|
||||
# Bad variable names which should always be refused, separated by a comma
|
||||
bad-names=foo,bar,baz,toto,tutu,tata
|
||||
|
||||
# Colon-delimited sets of names that determine each other's naming style when
|
||||
# the name regexes allow several styles.
|
||||
name-group=
|
||||
|
||||
# Include a hint for the correct naming format with invalid-name
|
||||
include-naming-hint=no
|
||||
|
||||
# List of decorators that produce properties, such as abc.abstractproperty. Add
|
||||
# to this list to register other decorators that produce valid properties.
|
||||
property-classes=abc.abstractproperty
|
||||
|
||||
# Regular expression matching correct function names
|
||||
function-rgx=[a-z_][a-z0-9_]{2,30}$
|
||||
|
||||
# Naming hint for function names
|
||||
function-name-hint=[a-z_][a-z0-9_]{2,30}$
|
||||
|
||||
# Regular expression matching correct variable names
|
||||
variable-rgx=[a-z_][a-z0-9_]{2,30}$
|
||||
|
||||
# Naming hint for variable names
|
||||
variable-name-hint=[a-z_][a-z0-9_]{2,30}$
|
||||
|
||||
# Regular expression matching correct constant names
|
||||
const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
|
||||
|
||||
# Naming hint for constant names
|
||||
const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$
|
||||
|
||||
# Regular expression matching correct attribute names
|
||||
attr-rgx=[a-z_][a-z0-9_]{2,30}$
|
||||
|
||||
# Naming hint for attribute names
|
||||
attr-name-hint=[a-z_][a-z0-9_]{2,30}$
|
||||
|
||||
# Regular expression matching correct argument names
|
||||
argument-rgx=[a-z_][a-z0-9_]{2,30}$
|
||||
|
||||
# Naming hint for argument names
|
||||
argument-name-hint=[a-z_][a-z0-9_]{2,30}$
|
||||
|
||||
# Regular expression matching correct class attribute names
|
||||
class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
|
||||
|
||||
# Naming hint for class attribute names
|
||||
class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
|
||||
|
||||
# Regular expression matching correct inline iteration names
|
||||
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
|
||||
|
||||
# Naming hint for inline iteration names
|
||||
inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$
|
||||
|
||||
# Regular expression matching correct class names
|
||||
class-rgx=[A-Z_][a-zA-Z0-9]+$
|
||||
|
||||
# Naming hint for class names
|
||||
class-name-hint=[A-Z_][a-zA-Z0-9]+$
|
||||
|
||||
# Regular expression matching correct module names
|
||||
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
|
||||
|
||||
# Naming hint for module names
|
||||
module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
|
||||
|
||||
# Regular expression matching correct method names
|
||||
method-rgx=[a-z_][a-z0-9_]{2,30}$
|
||||
|
||||
# Naming hint for method names
|
||||
method-name-hint=[a-z_][a-z0-9_]{2,30}$
|
||||
|
||||
# Regular expression which should only match function or class names that do
|
||||
# not require a docstring.
|
||||
no-docstring-rgx=^_
|
||||
|
||||
# Minimum line length for functions/classes that require docstrings, shorter
|
||||
# ones are exempt.
|
||||
docstring-min-length=-1
|
||||
|
||||
|
||||
[ELIF]
|
||||
|
||||
# Maximum number of nested blocks for function / method body
|
||||
max-nested-blocks=5
|
||||
|
||||
|
||||
[MISCELLANEOUS]
|
||||
|
||||
# List of note tags to take in consideration, separated by a comma.
|
||||
notes=FIXME,XXX,TODO
|
||||
|
||||
|
||||
[SIMILARITIES]
|
||||
|
||||
# Minimum lines number of a similarity.
|
||||
min-similarity-lines=4
|
||||
|
||||
# Ignore comments when computing similarities.
|
||||
ignore-comments=yes
|
||||
|
||||
# Ignore docstrings when computing similarities.
|
||||
ignore-docstrings=yes
|
||||
|
||||
# Ignore imports when computing similarities.
|
||||
ignore-imports=no
|
||||
|
||||
|
||||
[LOGGING]
|
||||
|
||||
# Logging modules to check that the string format arguments are in logging
|
||||
# function parameter format
|
||||
logging-modules=logging
|
||||
|
||||
|
||||
[VARIABLES]
|
||||
|
||||
# Tells whether we should check for unused import in __init__ files.
|
||||
init-import=no
|
||||
|
||||
# A regular expression matching the name of dummy variables (i.e. expectedly
|
||||
# not used).
|
||||
dummy-variables-rgx=(_+[a-zA-Z0-9]*?$)|dummy
|
||||
|
||||
# List of additional names supposed to be defined in builtins. Remember that
|
||||
# you should avoid to define new builtins when possible.
|
||||
additional-builtins=
|
||||
|
||||
# List of strings which can identify a callback function by name. A callback
|
||||
# name must start or end with one of those strings.
|
||||
callbacks=cb_,_cb
|
||||
|
||||
# List of qualified module names which can have objects that can redefine
|
||||
# builtins.
|
||||
redefining-builtins-modules=six.moves,future.builtins
|
||||
|
||||
|
||||
[IMPORTS]
|
||||
|
||||
# Deprecated modules which should not be used, separated by a comma
|
||||
deprecated-modules=regsub,TERMIOS,Bastion,rexec
|
||||
|
||||
# Create a graph of every (i.e. internal and external) dependencies in the
|
||||
# given file (report RP0402 must not be disabled)
|
||||
import-graph=
|
||||
|
||||
# Create a graph of external dependencies in the given file (report RP0402 must
|
||||
# not be disabled)
|
||||
ext-import-graph=
|
||||
|
||||
# Create a graph of internal dependencies in the given file (report RP0402 must
|
||||
# not be disabled)
|
||||
int-import-graph=
|
||||
|
||||
# Force import order to recognize a module as part of the standard
|
||||
# compatibility libraries.
|
||||
known-standard-library=
|
||||
|
||||
# Force import order to recognize a module as part of a third party library.
|
||||
known-third-party=enchant
|
||||
|
||||
# Analyse import fallback blocks. This can be used to support both Python 2 and
|
||||
# 3 compatible code, which means that the block might have code that exists
|
||||
# only in one or another interpreter, leading to false positives when analysed.
|
||||
analyse-fallback-blocks=no
|
||||
|
||||
|
||||
[CLASSES]
|
||||
|
||||
# List of method names used to declare (i.e. assign) instance attributes.
|
||||
defining-attr-methods=__init__,__new__,setUp
|
||||
|
||||
# List of valid names for the first argument in a class method.
|
||||
valid-classmethod-first-arg=cls
|
||||
|
||||
# List of valid names for the first argument in a metaclass class method.
|
||||
valid-metaclass-classmethod-first-arg=mcs
|
||||
|
||||
# List of member names, which should be excluded from the protected access
|
||||
# warning.
|
||||
exclude-protected=_asdict,_fields,_replace,_source,_make
|
||||
|
||||
|
||||
[DESIGN]
|
||||
|
||||
# Maximum number of arguments for function / method
|
||||
max-args=5
|
||||
|
||||
# Argument names that match this expression will be ignored. Default to name
|
||||
# with leading underscore
|
||||
ignored-argument-names=_.*
|
||||
|
||||
# Maximum number of locals for function / method body
|
||||
max-locals=15
|
||||
|
||||
# Maximum number of return / yield for function / method body
|
||||
max-returns=6
|
||||
|
||||
# Maximum number of branch for function / method body
|
||||
max-branches=12
|
||||
|
||||
# Maximum number of statements in function / method body
|
||||
max-statements=50
|
||||
|
||||
# Maximum number of parents for a class (see R0901).
|
||||
max-parents=7
|
||||
|
||||
# Maximum number of attributes for a class (see R0902).
|
||||
max-attributes=7
|
||||
|
||||
# Minimum number of public methods for a class (see R0903).
|
||||
min-public-methods=2
|
||||
|
||||
# Maximum number of public methods for a class (see R0904).
|
||||
max-public-methods=20
|
||||
|
||||
# Maximum number of boolean expressions in a if statement
|
||||
max-bool-expr=5
|
||||
|
||||
|
||||
[EXCEPTIONS]
|
||||
|
||||
# Exceptions that will emit a warning when being caught. Defaults to
|
||||
# "Exception"
|
||||
overgeneral-exceptions=Exception
|
Loading…
Reference in New Issue