4
4
5
5
## Build selection
6
6
7
- ### ` CIBW_PLATFORM ` {: #platform}
7
+ ### ` platform ` {: #platform cmd-line env-var }
8
8
9
9
> Override the auto-detected target platform
10
10
@@ -38,7 +38,7 @@ This option can also be set using the [command-line option](#command-line) `--pl
38
38
not require `--platform` or `--arch`, and will override any build/skip
39
39
configuration.
40
40
41
- ### ` CIBW_BUILD ` , ` CIBW_SKIP ` {: #build-skip}
41
+ ### ` build ` & ` skip ` {: #build-skip toml="build, skip" env-var="CIBW_BUILD, CIBW_SKIP" }
42
42
43
43
> Choose the Python versions to build
44
44
@@ -169,7 +169,7 @@ See the [cibuildwheel 2 documentation](https://cibuildwheel.pypa.io/en/2.x/) for
169
169
</style >
170
170
171
171
172
- ### ` CIBW_ARCHS ` {: #archs}
172
+ ### ` archs ` {: #archs cmd-line env-var toml }
173
173
> Change the architectures built on your machine by default.
174
174
175
175
A list of architectures to build.
@@ -1702,8 +1702,48 @@ Some options support placeholders, like `{project}`, `{package}` or `{wheel}`, t
1702
1702
.options-toc a .option code {
1703
1703
font-size : 80% ;
1704
1704
}
1705
- h3 code {
1706
- font-size : 100% ;
1705
+ .rst-content h3 code {
1706
+ font-size : 115% ;
1707
+ }
1708
+ .rst-content h3 code .cmd-line , .rst-content h3 code .toml , .rst-content h3 code .env-var {
1709
+ font-size : 80% ;
1710
+ float : right ;
1711
+ margin-left : 8px ;
1712
+ display : inline-flex ;
1713
+ flex-direction : column ;
1714
+ justify-content : left ;
1715
+ padding-left : 10px ;
1716
+ padding-right : 10px ;
1717
+ line-height : normal ;
1718
+ }
1719
+ .rst-content h3 code .cmd-line :before , .rst-content h3 code .toml :before , .rst-content h3 code .env-var :before {
1720
+ content : ' ' ;
1721
+ font-size : 10px ;
1722
+ font-weight : bold ;
1723
+ opacity : 0.3 ;
1724
+ display : inline-block ;
1725
+ border-radius : 5px ;
1726
+ margin-left : -3px ;
1727
+ margin-right : -3px ;
1728
+ margin-bottom : -1px ;
1729
+ }
1730
+ .rst-content h3 code .cmd-line :before {
1731
+ content : ' command line' ;
1732
+ }
1733
+ .rst-content h3 code .cmd-line {
1734
+ background : rgba (224 , 202 , 56 , 0.3 );
1735
+ }
1736
+ .rst-content h3 code .toml :before {
1737
+ content : ' pyproject.toml' ;
1738
+ }
1739
+ .rst-content h3 code .toml {
1740
+ background : rgba (41 , 128 , 185 , 0.3 );
1741
+ }
1742
+ .rst-content h3 code .env-var :before {
1743
+ content : ' env var' ;
1744
+ }
1745
+ .rst-content h3 code .env-var {
1746
+ background : rgba (61 , 153 , 112 , 0.3 );
1707
1747
}
1708
1748
</style >
1709
1749
@@ -1714,9 +1754,6 @@ Some options support placeholders, like `{project}`, `{package}` or `{wheel}`, t
1714
1754
var headers = []
1715
1755
1716
1756
$ (' .rst-content h3' )
1717
- .filter (function (i , el ) {
1718
- return !! $ (el).text ().match (/ (^ ([A-Z0-9 , _*] | and )+ )¶$ / );
1719
- })
1720
1757
.each (function (i , el ) {
1721
1758
var optionName = $ (el).text ().replace (' ¶' , ' ' );
1722
1759
var description = $ (el).next (' blockquote' ).text ()
@@ -1795,7 +1832,46 @@ Some options support placeholders, like `{project}`, `{package}` or `{wheel}`, t
1795
1832
markdown += ' |\n '
1796
1833
}
1797
1834
}
1798
-
1799
1835
console .log (' readme options markdown\n ' , markdown)
1836
+
1837
+ // add the option tags to each heading
1838
+ $ (' .rst-content h3' )
1839
+ .each (function (i , el ) {
1840
+ el .classList .add (' option' , ' clearfix' );
1841
+ var optionName = $ (el).text ().replace (' ¶' , ' ' );
1842
+
1843
+ // some options are specified as their env var names
1844
+ if (optionName .startsWith (' CIBW_' )) {
1845
+ optionName = optionName .replace (' CIBW_' , ' ' );
1846
+ optionName = optionName .replace (/ _/ g , ' -' );
1847
+ optionName = optionName .toLowerCase ();
1848
+ }
1849
+
1850
+ var cmdLine = el .getAttribute (' cmd-line' );
1851
+ var envVar = el .getAttribute (' env-var' );
1852
+ var toml = el .getAttribute (' toml' );
1853
+
1854
+ // fill default value
1855
+ if (cmdLine == " cmd-line" ) {
1856
+ cmdLine = ' --' + optionName;
1857
+ }
1858
+ if (envVar == " env-var" ) {
1859
+ envVar = ' CIBW_' + optionName .toUpperCase ().replace (/ -/ g , ' _' );
1860
+ }
1861
+ if (toml == " toml" ) {
1862
+ toml = optionName
1863
+ }
1864
+
1865
+ if (envVar) {
1866
+ $ (el).append (' <code class="env-var" title="Environment variable">' + envVar+ ' </code>' );
1867
+ }
1868
+ if (toml) {
1869
+ $ (el).append (' <code class="toml" title="TOML option key">' + toml+ ' </code>' );
1870
+ }
1871
+ if (cmdLine) {
1872
+ $ (el).append (' <code class="cmd-line" title="Command line argument">' + cmdLine+ ' </code>' );
1873
+ }
1874
+ });
1800
1875
});
1876
+
1801
1877
</script >
0 commit comments