Commit Graph

8 Commits

Author SHA1 Message Date
Xavier Claessens 173c115834 Add wrap mode to disable auto promote 2020-10-13 17:55:16 -04:00
Daniel Mensinger 449dd8e72a
typing: fully annotate wrap 2020-09-08 20:15:56 +02:00
Michael Hirsch, Ph.D a47c1374b9 wrap.py: apply type annotation, modernize syntax
correct syntax issues, missing imports revealed by type annotation checking
2019-11-07 22:14:59 +02:00
Jussi Pakkanen 4d986563dc Expose wrap_mode as an option. Closes #4266. 2018-10-07 22:52:54 +03:00
Nicolas Dufresne 3147b41787 help: Fix printing list of wrap mode
Implement a string converter in our WrapMode enum so that argparse will
only print the names in the doc instead of WrapMode.<name>.

This changes --help command from printing:
  --wrap-mode {WrapMode.default,WrapMode.nofallback,WrapMode.nodownload,WrapMode.forcefallback}
to:
  --wrap-mode {default,nofallback,nodownload,forcefallback}

Fixes issue #4067
2018-08-22 10:43:08 -04:00
Mathieu Duponchelle 31f0242a6f new wrap-mode: forcefallback
This can be useful to make sure that a project builds when
its fallbacks are used on systems where external dependencies
satisfy the version requirements, or to easily hack on the sources
of a dependency for which a fallback exists.
2018-04-06 23:48:48 +02:00
Nirbheek Chauhan d5975cc683 wrap: Implement special wrap modes for use by packagers
Special wrap modes:
  nofallback: Don't download wraps for dependency() fallbacks
  nodownload: Don't download wraps for all subproject() calls

Subprojects are used for two purposes:
1. To download and build dependencies by using .wrap files if they
   are not provided by the system. This is usually expressed via
   dependency(..., fallback: ...).
2. To download and build 'copylibs' which are meant to be used by
   copying into your project. This is always done with an explicit
   subproject() call.

--wrap-mode=nofallback will never do (1)
--wrap-mode=nodownload will do neither (1) nor (2)

If you are building from a release tarball, you should be able to
safely use 'nodownload' since upstream is expected to ship all
required sources with the tarball.

If you are building from a git repository, you will want to use
'nofallback' so that any 'copylib' wraps will be download as
subprojects.

Note that these options do not affect subprojects that are git
submodules since those are only usable in git repositories, and you
almost always want to download them.
2017-03-25 06:57:30 +05:30
Jussi Pakkanen 84456537da Fix some issues that break pypi installs and bump version to upload new version. 2016-01-16 20:59:34 +02:00