Skip to content

Commit a0fee6b

Browse files
committed
🤝 merge with master
2 parents e7e07ef + 6368096 commit a0fee6b

File tree

6 files changed

+34
-11
lines changed

6 files changed

+34
-11
lines changed

.travis.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,6 @@ jobs:
2020

2121
stage: test
2222

23-
before_script:
24-
- git clone https://github.com/sphinx-doc/sphinx ../sphinx
25-
- (cd .. && ln -s sphinx/sphinx/templates/quickstart/
26-
sphinx-quickstart-templates)
27-
- sed -i "s/{{ \(\w*\) | repr }}/'{{ \1 }}'/;s/{%- \(for\|endfor\)/{% \1/"
28-
../sphinx-quickstart-templates/conf.py_t
29-
3023
script:
3124
- find templates/ -type f -name '*.jj2' -exec echo '{}' \;|sed -e "s/templates\//{%include \"/" -e "s/$/\" %}/" > test.file
3225
- moban -c config/data.yml -t test.file -td templates .

templates/Pipfile.jj2

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[[source]]
2+
url = 'https://pypi.python.org/simple'
3+
verify_ssl = true
4+
name = 'pypi'
5+
6+
[requires]
7+
python_version= '3.6'
8+
9+
[packages]
10+
{% for dependency in dependencies: %}
11+
{% if '=' in dependency %}
12+
{{dependency}}
13+
{% else %}
14+
{{dependency}} = "*"
15+
{% endif %}
16+
{% endfor %}

templates/docs/conf.py_t

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,11 @@ templates_path = ['{{ dot }}templates']
6262
# source_suffix = ['.rst', '.md']
6363
source_suffix = '{{ suffix }}'
6464

65+
{% if master_doc != 'index' -%}
6566
# The master toctree document.
6667
master_doc = '{{ master_str }}'
6768

69+
{% endif -%}
6870
# The language for content autogenerated by Sphinx. Refer to documentation
6971
# for a list of supported languages.
7072
#
@@ -78,7 +80,7 @@ language = {{ language | repr }}
7880
exclude_patterns = [{{ exclude_patterns }}]
7981

8082
# The name of the Pygments (syntax highlighting) style to use.
81-
pygments_style = 'sphinx'
83+
pygments_style = None
8284

8385

8486
# -- Options for HTML output -------------------------------------------------

templates/setup.py.jj2

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,18 @@ DESCRIPTION = (
6363
URL = 'https://{{scm_host}}/{{organisation}}/{{name}}'
6464
DOWNLOAD_URL = '%s/archive/{{release}}.tar.gz' % URL
6565
FILES = ['README.rst',{%block morefiles %}{%endblock%} 'CHANGELOG.rst']
66+
{% if self.additional_keywords %}
67+
{% set additional_keywords = self.additional_keywords() %}
68+
{% if additional_keywords and not additional_keywords.rstrip().endswith(',') %}
69+
{% set additional_keywords = additional_keywords.rstrip() + ',\n' %}
70+
{% endif %}
71+
{% endif %}
6672
KEYWORDS = [
6773
'python',
6874
{% for keyword in keywords %}
6975
'{{keyword}}',
7076
{% endfor %}
71-
{%block additional_keywords%}
77+
{%block additional_keywords -%}
7278
{%endblock%}
7379
]
7480

templates/test.script.jj2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
{%endif%}
2323
{%endif%}
2424
pip freeze
25-
nosetests --with-coverage --cover-package {{package|lower|replace('-', '_')}} --cover-package tests {%if include_doctest%}--with-doctest --doctest-extension=.rst README.rst{%endif%} tests {%if not nodocs%}docs/source{%endif%} {%if not external_module_library%}{{package|lower|replace('-', '_')}}{%endif%} && flake8 . --exclude=.moban.d {%block flake8_options%}--builtins=unicode,xrange,long{%endblock%}
25+
nosetests --with-coverage --cover-package {{package|lower|replace('-', '_')}} --cover-package tests tests {%if include_doctest%}--with-doctest --doctest-extension=.rst README.rst{%endif%} {%if not nodocs%}docs/source{%endif%} {%if not external_module_library%}{{package|lower|replace('-', '_')}}{%endif%} && flake8 . --exclude=.moban.d,docs {%block flake8_options%}--builtins=unicode,xrange,long{%endblock%}
2626

2727
{%block posttest%}
2828
{%endblock%}

upstreaming.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1+
requires:
2+
- https://github.com/sphinx-doc/sphinx
13
configuration:
24
configuration: config/data.yml
35
template_dir:
46
- .moban.dt/
57
- templates
6-
- ../sphinx-quickstart-templates
8+
- sphinx:sphinx/templates/quickstart
9+
targets:
10+
- .gitignore: gitignore.jj2
11+
- LICENSE: NEW_BSD_LICENSE.jj2
12+
- README.rst: local-README.rst.jj2
713
copy:
814
- templates/docs/Makefile.jj2: Makefile.new_t
915
- templates/docs/make.bat.jj2: make.bat.new_t

0 commit comments

Comments
 (0)