|
77 | 77 | $(PY3TEST) |
78 | 78 |
|
79 | 79 | analyze: |
80 | | - flake8 -j 1 --max-line-length=250 \ |
| 80 | + flake8 --color never -j 1 --max-line-length=250 \ |
81 | 81 | --ignore=W503,E201,E202,E203,E127,E221,E223,E226,E231,E241,E242,E251,E265,E272,E274 \ |
82 | 82 | slip39 |
83 | 83 |
|
@@ -127,6 +127,63 @@ slip39/layout/COVER.txt: |
127 | 127 | # Any build dependencies that are dynamically generated, and may need updating from time to time |
128 | 128 | deps: $(TXT) slip39/gui/SLIP-39.txt slip39/layout/COVER.txt |
129 | 129 |
|
| 130 | + |
| 131 | +# |
| 132 | +# Agent Keypairs, Product Licences |
| 133 | +# |
| 134 | + |
| 135 | +GLOBAL_OPTIONS = -vv |
| 136 | + |
| 137 | +CREDENTIALS = $(abspath $(HOME)/.crypto-licensing ) |
| 138 | + |
| 139 | +export CRYPTO_LIC_PASSWORD |
| 140 | +export CRYPTO_LIC_USERNAME |
| 141 | + |
| 142 | +.PHONY: slip-39 perry-kundert |
| 143 | +products: slip-39 \ |
| 144 | + perry-kundert \ |
| 145 | + |
| 146 | +slip-39: |
| 147 | + |
| 148 | + |
| 149 | +perry-kundert: CRYPTO_LIC_PASSWORD=password |
| 150 | +perry-kundert: slip39/invoice/payments_test/perry-kundert.crypto-license |
| 151 | +perry-kundert: GRANTS="{\"crypto-licensing-server\": {\ |
| 152 | + \"override\": { \ |
| 153 | + \"rate\": \"0.1%\", \ |
| 154 | + \"crypto\": { \ |
| 155 | + \"ETH\": \"0xe4909b66FD66DA7d86114695A1256418580C8767\", \ |
| 156 | + \"BTC\": \"bc1qygm3dlynmjxuflghr0hmq6r7wmff2jd5gtgz0q\" \ |
| 157 | + }\ |
| 158 | + }\ |
| 159 | +}}" |
| 160 | + |
| 161 | + |
| 162 | + |
| 163 | +# Create .crypto-keypair from seed; note: if the make rule fails, intermediate files are deleted. |
| 164 | +# We expect any password to be transmitted in CRYPTO_LIC_PASSWORD env. var. |
| 165 | +%.crypto-keypair: %.crypto-seed |
| 166 | + $(PY3) -m crypto_licensing $(GLOBAL_OPTIONS) \ |
| 167 | + --extra $(dir $(basename $@ )) \ |
| 168 | + --name $(notdir $(basename $@ )) \ |
| 169 | + --reverse-save \ |
| 170 | + registered \ |
| 171 | + --username $(USERNAME) \ |
| 172 | + --seed $$( cat $< ) |
| 173 | + |
| 174 | +# Create .crypto-license, signed by .crypto-keypair |
| 175 | +%.crypto-license : %.crypto-keypair |
| 176 | + $(PY3) -m crypto_licensing $(GLOBAL_OPTIONS) \ |
| 177 | + --extra $(dir $(basename $@ )) \ |
| 178 | + --name $(notdir $(basename $@ )) \ |
| 179 | + --reverse-save \ |
| 180 | + license \ |
| 181 | + --username $(USERNAME) --no-registering \ |
| 182 | + --client $(CLIENT) --client-pubkey $(CLIENT_PUBKEY) \ |
| 183 | + --grant $(GRANTS) \ |
| 184 | + --author $(AUTHOR) --domain $(DOMAIN) --product $(PRODUCT) $(LICENSE_OPTIONS) |
| 185 | + |
| 186 | + |
130 | 187 | # |
131 | 188 | # VirtualEnv build, install and activate |
132 | 189 | # |
|
0 commit comments