Skip to content

Commit 95927d4

Browse files
authored
Merge pull request #67 from moremoban/dev
release 0.0.2
2 parents 151ec87 + f26052d commit 95927d4

File tree

5 files changed

+105
-80
lines changed

5 files changed

+105
-80
lines changed

CHANGELOG.rst

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,25 @@
11
Change log
22
================================================================================
33

4-
0.0.1 - 05.11.2018
4+
0.0.2 - 18-01-2019
5+
--------------------------------------------------------------------------------
6+
7+
Added
8+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9+
10+
#. `#60 <https://github.com/moremoban/pypi-mobans/pull/60>`_: codec and locale
11+
hacks added
12+
#. `#61 <https://github.com/moremoban/pypi-mobans/pull/61>`_: add python
13+
classifiers
14+
15+
Updated
16+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17+
18+
#. `#63 <https://github.com/moremoban/pypi-mobans/pull/63>`_: updated Pipfile
19+
implementation
20+
#. Synchronize with sphinx doc file at release date
21+
22+
0.0.1 - 05-11-2018
523
--------------------------------------------------------------------------------
624

725
First release

changelog.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,22 @@
11
name: "pypi-mobans"
22
organisation: moremoban
33
releases:
4+
- changes:
5+
- action: Added
6+
details:
7+
- "`PR#60`: codec and locale hacks added"
8+
- "`PR#61`: add python classifiers"
9+
- action: Updated
10+
details:
11+
- "`PR#63`: updated Pipfile implementation"
12+
- Synchronize with sphinx doc file at release date
13+
date: 18-01-2019
14+
version: 0.0.2
415
- changes:
516
- action: First release
617
details:
718
- versioning is applied
819
- Pipfile included
9-
date: 05.11.2018
20+
date: 05-11-2018
1021
version: 0.0.1
1122

templates/Pipfile.jj2

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,25 @@ python_version= '3.6'
88

99
[packages]
1010
{% for dependency in dependencies: %}
11-
{% if '=' in dependency %}
11+
{% if ('=' in dependency) or ('>' in dependency) or ('<' in dependency) %}
1212
{{dependency}}
1313
{% else %}
1414
{{dependency}} = "*"
1515
{% endif %}
1616
{% endfor %}
17+
18+
[dev-packages]
19+
nose = "*"
20+
mock = "*"
21+
codecov = "*"
22+
coverage = "*"
23+
flake8 = "*"
24+
{% if dev_dependencies is defined %}
25+
{% for dependency in dev_dependencies: %}
26+
{% if ('=' in dependency) or ('>' in dependency) or ('<' in dependency) %}
27+
{{dependency}}
28+
{% else %}
29+
{{dependency}} = "*"
30+
{% endif %}
31+
{% endfor %}
32+
{% endif %}

templates/docs/conf.py_t

Lines changed: 12 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
# -*- coding: utf-8 -*-
2-
#
31
# Configuration file for the Sphinx documentation builder.
42
#
5-
# This file does only contain a selection of the most common options. For a
6-
# full list see the documentation:
3+
# This file only contains a selection of the most common options. For a full
4+
# list see the documentation:
75
# http://www.sphinx-doc.org/en/master/config
86

97
# -- Path setup --------------------------------------------------------------
@@ -15,35 +13,31 @@
1513
{% if append_syspath -%}
1614
import os
1715
import sys
18-
sys.path.insert(0, u'{{ module_path }}')
16+
sys.path.insert(0, {{ module_path | repr }})
1917
{% else -%}
2018
# import os
2119
# import sys
2220
{% if module_path -%}
23-
# sys.path.insert(0, u'{{ module_path }}')
21+
# sys.path.insert(0, {{ module_path | repr }})
2422
{% else -%}
2523
# sys.path.insert(0, os.path.abspath('.'))
2624
{% endif -%}
2725
{% endif %}
2826

2927
# -- Project information -----------------------------------------------------
3028

31-
project = u'{{ project_str }}'
32-
copyright = u'{{ copyright_str }}'
33-
author = u'{{ author_str }}'
29+
project = {{ project | repr }}
30+
copyright = {{ copyright | repr }}
31+
author = {{ author | repr }}
3432

3533
# The short X.Y version
36-
version = u'{{ version_str }}'
34+
version = {{ version | repr }}
3735
# The full version, including alpha/beta/rc tags
38-
release = u'{{ release_str }}'
36+
release = {{ release | repr }}
3937

4038

4139
# -- General configuration ---------------------------------------------------
4240

43-
# If your documentation needs a minimal Sphinx version, state it here.
44-
#
45-
# needs_sphinx = '1.0'
46-
4741
# Add any Sphinx extension module names here, as strings. They can be
4842
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
4943
# ones.
@@ -60,11 +54,11 @@ templates_path = ['{{ dot }}templates']
6054
# You can specify multiple suffix as a list of string:
6155
#
6256
# source_suffix = ['.rst', '.md']
63-
source_suffix = '{{ suffix }}'
57+
source_suffix = {{ suffix | repr }}
6458

6559
{% if master_doc != 'index' -%}
6660
# The master toctree document.
67-
master_doc = '{{ master_str }}'
61+
master_doc = {{ master | repr }}
6862

6963
{% endif -%}
7064
# The language for content autogenerated by Sphinx. Refer to documentation
@@ -79,9 +73,6 @@ language = {{ language | repr }}
7973
# This pattern also affects html_static_path and html_extra_path.
8074
exclude_patterns = [{{ exclude_patterns }}]
8175

82-
# The name of the Pygments (syntax highlighting) style to use.
83-
pygments_style = None
84-
8576

8677
# -- Options for HTML output -------------------------------------------------
8778

@@ -112,63 +103,6 @@ html_static_path = ['{{ dot }}static']
112103
# html_sidebars = {}
113104

114105

115-
# -- Options for HTMLHelp output ---------------------------------------------
116-
117-
# Output file base name for HTML help builder.
118-
htmlhelp_basename = '{{ project_fn }}doc'
119-
120-
121-
# -- Options for LaTeX output ------------------------------------------------
122-
123-
latex_elements = {
124-
# The paper size ('letterpaper' or 'a4paper').
125-
#
126-
# 'papersize': 'letterpaper',
127-
128-
# The font size ('10pt', '11pt' or '12pt').
129-
#
130-
# 'pointsize': '10pt',
131-
132-
# Additional stuff for the LaTeX preamble.
133-
#
134-
# 'preamble': '',
135-
136-
# Latex figure (float) alignment
137-
#
138-
# 'figure_align': 'htbp',
139-
}
140-
141-
# Grouping the document tree into LaTeX files. List of tuples
142-
# (source start file, target name, title,
143-
# author, documentclass [howto, manual, or own class]).
144-
latex_documents = [
145-
(master_doc, '{{ project_fn }}.tex', u'{{ project_doc_texescaped_str }}',
146-
u'{{ author_texescaped_str }}', 'manual'),
147-
]
148-
149-
150-
# -- Options for manual page output ------------------------------------------
151-
152-
# One entry per manual page. List of tuples
153-
# (source start file, name, description, authors, manual section).
154-
man_pages = [
155-
(master_doc, '{{ project_manpage }}', u'{{ project_doc_str }}',
156-
[author], 1)
157-
]
158-
159-
160-
# -- Options for Texinfo output ----------------------------------------------
161-
162-
# Grouping the document tree into Texinfo files. List of tuples
163-
# (source start file, target name, title, author,
164-
# dir menu entry, description, category)
165-
texinfo_documents = [
166-
(master_doc, '{{ project_fn }}', u'{{ project_doc_str }}',
167-
author, '{{ project_fn }}', 'One line description of project.',
168-
'Miscellaneous'),
169-
]
170-
171-
172106
# -- Options for Epub output -------------------------------------------------
173107

174108
# Bibliographic Dublin Core info.
@@ -204,3 +138,4 @@ intersphinx_mapping = {'https://docs.python.org/': None}
204138
# If true, `todo` and `todoList` produce output, else they produce nothing.
205139
todo_include_todos = True
206140
{%- endif %}
141+

templates/setup.py.jj2

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
{% block shebang %}
55
#!/usr/bin/env python3
66
{% endblock %}
7+
{% set min_python_version = min_python_version|default('2.6') %}
8+
{% set min_python_version = min_python_version.split('.', 2) %}
79

810
{% block header %}
911
# Template by pypi-mobans
@@ -25,8 +27,30 @@ from platform import python_implementation
2527
{%block compat_block%}
2628
PY2 = sys.version_info[0] == 2
2729
PY26 = PY2 and sys.version_info[1] < 7
30+
PY33 = sys.version_info < (3, 4)
2831
{%endblock%}
2932

33+
# Work around mbcs bug in distutils.
34+
# http://bugs.python.org/issue10945
35+
# This work around is only if a project supports Python < 3.4
36+
{% if PY33 %}
37+
try:
38+
codecs.lookup('mbcs')
39+
except LookupError:
40+
ascii = codecs.lookup('ascii')
41+
func = lambda name, enc=ascii: {True: enc}.get(name=='mbcs')
42+
codecs.register(func)
43+
{% endif %}
44+
45+
# Work around for locale not being set
46+
try:
47+
lc = locale.getlocale()
48+
pf = platform.system()
49+
if pf != 'Windows' and lc == (None, None):
50+
locale.setlocale(locale.LC_ALL, 'C.UTF-8')
51+
except (ValueError, UnicodeError, locale.Error):
52+
locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
53+
3054
NAME = '{{name}}'
3155
AUTHOR = '{{author}}'
3256
VERSION = '{{current_version}}'
@@ -84,12 +108,33 @@ CLASSIFIERS = [
84108
'Topic :: Software Development :: Libraries',
85109
'Programming Language :: Python',
86110
'Intended Audience :: Developers',
111+
{% if min_python_version <= ['2', '6'] %}
87112
'Programming Language :: Python :: 2.6',
113+
{%- endif %}
114+
115+
{% if min_python_version <= ['2', '7'] %}
88116
'Programming Language :: Python :: 2.7',
117+
{%- endif %}
118+
119+
{%- if min_python_version[0] == '3' %}
120+
'Programming Language :: Python :: 3 :: Only',
121+
{%- endif %}
122+
123+
{% if min_python_version <= ['3','3'] %}
89124
'Programming Language :: Python :: 3.3',
125+
{%- endif %}
126+
127+
{% if min_python_version <= ['3','4'] %}
90128
'Programming Language :: Python :: 3.4',
129+
{%- endif %}
130+
131+
{% if min_python_version <= ['3','5'] %}
91132
'Programming Language :: Python :: 3.5',
133+
{%- endif %}
134+
135+
{% if min_python_version <= ['3','6'] %}
92136
'Programming Language :: Python :: 3.6',
137+
{% endif %}
93138
{%block additional_classifiers%}
94139
{%endblock %}
95140
]

0 commit comments

Comments
 (0)