{"id":944,"date":"2015-05-20T17:57:53","date_gmt":"2015-05-20T08:57:53","guid":{"rendered":"https:\/\/blog.ymyzk.com\/?p=944"},"modified":"2015-05-20T17:57:53","modified_gmt":"2015-05-20T08:57:53","slug":"tox-2-environment-variable-isolation","status":"publish","type":"post","link":"https:\/\/blog.ymyzk.com\/2015\/05\/tox-2-environment-variable-isolation\/","title":{"rendered":"tox 2.0 \u304b\u3089\u74b0\u5883\u5909\u6570\u306e\u5206\u96e2\u6a5f\u80fd\u304c\u5165\u3063\u305f"},"content":{"rendered":"

2015\/5\/12 \u306b\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u305f tox 2.0.0 \u304b\u3089\u74b0\u5883\u5909\u6570\u306e\u5206\u96e2\u6a5f\u80fd (environment variable isolation) \u304c\u642d\u8f09\u3055\u308c\u307e\u3057\u305f. \u3053\u308c\u306b\u3088\u308a tox \u3067\u5b9f\u884c\u3059\u308b\u30c6\u30b9\u30c8\u30b3\u30fc\u30c9\u4e2d\u3067\u74b0\u5883\u5909\u6570\u3092\u5229\u7528\u3057\u3066\u3044\u308b\u5834\u5408\u554f\u984c\u304c\u767a\u751f\u3059\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059.<\/p>\n

<\/p>\n

Changelog<\/h2>\n

tox \u306e Changelog<\/a> \u306b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8aac\u660e\u3055\u308c\u3066\u3044\u307e\u3059.<\/p>\n

(new) introduce environment variable isolation: tox now only passes the PATH and PIP_INDEX_URL variable from the tox invocation environment to the test environment and on Windows also SYSTEMROOT, PATHEXT, TEMP and TMP whereas on unix additionally TMPDIR is passed. If you need to pass through further environment variables you can use the new passenv setting, a space-separated list of environment variable names. Each name can make use of fnmatch-style glob patterns. All environment variables which exist in the tox-invocation environment will be copied to the test environment.<\/p><\/blockquote>\n

\u3053\u308c\u306b\u3088\u308b\u3068 tox \u306f PATH<\/code> \u3084 PIP_INDEX_URL<\/code> \u3068\u3044\u3063\u305f\u4e00\u90e8\u306e\u74b0\u5883\u5909\u6570\u306e\u307f (\u5b9f\u884c\u74b0\u5883\u306b\u3088\u3063\u3066\u7570\u306a\u308b) \u3092 tox \u304c\u5b9f\u884c\u3055\u308c\u3066\u3044\u308b\u74b0\u5883\u304b\u3089, \u30c6\u30b9\u30c8\u74b0\u5883\u306b\u5f15\u304d\u7d99\u304e\u307e\u3059.<\/p>\n

\u305d\u308c\u4ee5\u5916\u306b\u8ffd\u52a0\u306e\u74b0\u5883\u5909\u6570\u3092\u5229\u7528\u3057\u305f\u3044\u5834\u5408\u306f passenv<\/code> \u3068\u3044\u3046\u8a2d\u5b9a\u306b, \u5229\u7528\u3059\u308b\u74b0\u5883\u5909\u6570\u3092\u8a18\u8ff0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3068\u306e\u3053\u3068\u3067\u3059.<\/p>\n

\u8a2d\u5b9a\u4f8b<\/h2>\n

\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u3066\u8a2d\u5b9a\u3057\u307e\u3059. \u74b0\u5883\u5909\u6570\u306f\u30b9\u30da\u30fc\u30b9\u533a\u5207\u308a\u3067\u5217\u6319\u3057, glob \u3082\u4f7f\u3048\u307e\u3059.<\/p>\n

[testenv]\r\npassenv = LANG TRAVIS*\r\n<\/pre>\n

\u30c6\u30b9\u30c8\u5b9f\u884c\u6642\u306b\u74b0\u5883\u5909\u6570\u306b\u30c8\u30fc\u30af\u30f3\u7b49\u3092\u8a2d\u5b9a\u3057\u3066\u3044\u308b\u5834\u5408\u306f, \u3053\u306e\u8a2d\u5b9a\u306f\u5fc5\u9808\u3067\u3059.<\/p>\n

\u307e\u305f, Travis CI \u306a\u3069\u306e CI \u30b5\u30fc\u30d3\u30b9\u3092\u5229\u7528\u3057\u3066\u3044\u308b\u5834\u5408, \u7279\u5b9a\u306e\u74b0\u5883\u5909\u6570\u3092\u7528\u3044\u3066 Travis CI \u3067\u5b9f\u884c\u3055\u308c\u3066\u3044\u308b\u304b\u3092\u5224\u5b9a\u3059\u308b\u3082\u306e (\u4f8b: coveralls-python) \u304c\u3042\u308b\u306e\u3067, \u5fc5\u8981\u306a\u74b0\u5883\u5909\u6570\u3092 pass \u3059\u308b\u3088\u3046\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u306e\u3067\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059.<\/p>\n","protected":false},"excerpt":{"rendered":"

2015\/5\/12 \u306b\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u305f tox 2.0.0 \u304b\u3089\u74b0\u5883\u5909\u6570\u306e\u5206\u96e2\u6a5f\u80fd (environment variable isolation) \u304c\u642d\u8f09\u3055\u308c\u307e\u3057\u305f. \u3053\u308c\u306b\u3088\u308a tox \u3067\u5b9f\u884c\u3059\u308b\u30c6\u30b9\u30c8\u30b3\u30fc\u30c9\u4e2d\u3067\u74b0\u5883\u5909 […]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26,3],"tags":[15,76],"_links":{"self":[{"href":"https:\/\/blog.ymyzk.com\/wp-json\/wp\/v2\/posts\/944"}],"collection":[{"href":"https:\/\/blog.ymyzk.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ymyzk.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ymyzk.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ymyzk.com\/wp-json\/wp\/v2\/comments?post=944"}],"version-history":[{"count":5,"href":"https:\/\/blog.ymyzk.com\/wp-json\/wp\/v2\/posts\/944\/revisions"}],"predecessor-version":[{"id":956,"href":"https:\/\/blog.ymyzk.com\/wp-json\/wp\/v2\/posts\/944\/revisions\/956"}],"wp:attachment":[{"href":"https:\/\/blog.ymyzk.com\/wp-json\/wp\/v2\/media?parent=944"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ymyzk.com\/wp-json\/wp\/v2\/categories?post=944"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ymyzk.com\/wp-json\/wp\/v2\/tags?post=944"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}