-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #187 from revesansparole/drop_python2
Drop python2
- Loading branch information
Showing
112 changed files
with
748 additions
and
814 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,8 @@ | |
language: python | ||
|
||
python: | ||
- "2.7" | ||
- "3.6" | ||
- "3.7" | ||
|
||
# #} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# {# pkglts, conda.package | ||
package: | ||
name: pkglts | ||
version: "5.0.0" | ||
version: "5.1.0" | ||
# #} | ||
|
||
# {# pkglts, conda.src | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,26 @@ | ||
""" | ||
Generate some files automatically | ||
""" | ||
from glob import glob | ||
from os.path import basename, dirname, isdir, join as pj | ||
from pathlib import Path | ||
|
||
from pkglts.tree_ascii_fmt import fmt_tree | ||
|
||
option_root_fld = "src/pkglts/option" | ||
doc_fld = "doc/option" | ||
option_root_fld = Path("src/pkglts/option") | ||
doc_fld = Path("doc/option") | ||
|
||
for option_fld in sorted(glob("{}/*/".format(option_root_fld))): | ||
option = basename(dirname(option_fld)) | ||
if not option.startswith("_"): | ||
for option_fld in sorted(option_root_fld.glob("*/")): | ||
option = option_fld.name | ||
if option_fld.is_dir() and not option.startswith("_"): | ||
print(option, option_fld) | ||
resource_fld = pj(option_fld, 'resource') | ||
if not isdir(resource_fld): | ||
resource_fld = option_fld / 'resource' | ||
if not resource_fld.exists(): | ||
print("this option does not create files") | ||
else: | ||
option_doc_fld = pj(doc_fld, option) | ||
if not isdir(option_doc_fld): | ||
print("no doc found for %s" % option) | ||
option_doc_fld = doc_fld / option | ||
if not option_doc_fld.exists(): | ||
print(f"no doc found for {option}") | ||
else: | ||
txt = "<pre>\n" + fmt_tree(resource_fld) + "</pre>\n" | ||
print(txt) | ||
|
||
with open(pj(option_doc_fld, "modifications.html"), 'w') as f: | ||
f.write(txt) | ||
(option_doc_fld / "modifications.html").write_text(txt) |
Oops, something went wrong.