Skip to content

Commit 5f042a5

Browse files
authored
Merge pull request #132 from moremoban/dev
release 0.0.9
2 parents 1703ca2 + c7ceff1 commit 5f042a5

31 files changed

+736
-100
lines changed

.moban.dt/local-README.rst.jj2

+16
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ Notes
4747
================================================================================
4848

4949

50+
Release and publish from command line
51+
--------------------------------------------------------------------------------
52+
5053
In order to run, `python setup.py publish`, you will have setup `.pypirc` in
5154
your home folder as::
5255

@@ -60,5 +63,18 @@ your home folder as::
6063

6164

6265
And you need to configure `gease`.
66+
67+
Auto publishing via github action
68+
--------------------------------------------------------------------------------
69+
70+
71+
In order to configure github to publish your package, you will need to set up
72+
two secrets::
73+
74+
PYPI_USERNAME
75+
PYPI_PASSWORD
76+
77+
Once you have done that, a github release will trigger an auto publishing.
78+
6379
{% endblock %}
6480

.moban.dt/local-travis.yml.jj2

-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ python:
66
- 2.7
77
{% endblock %}
88

9-
{% block extra_jobs %}
10-
allow_failures:
11-
- stage: test
12-
{% endblock %}
139

1410
{% block before_script %}
1511
before_script:

.travis.yml

-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ jobs:
4545
include:
4646
- *moban
4747
- *lint
48-
allow_failures:
49-
- stage: test
5048

5149
stage: test
5250

CHANGELOG.rst

+21
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,27 @@
11
Change log
22
================================================================================
33

4+
0.0.9 - 13.10.2019
5+
--------------------------------------------------------------------------------
6+
7+
**Added**
8+
9+
#. pypi download stats are displayed in README
10+
#. Add mit license text
11+
#. `#126 <https://github.com/moremoban/pypi-mobans/issues/126>`_: support github
12+
auto pypi publishing action
13+
#. `#133 <https://github.com/moremoban/pypi-mobans/issues/133>`_: provide CI
14+
azure build yaml files
15+
16+
**Updated**
17+
18+
#. Test on python 3.8 instead of python 3.8-dev
19+
#. `#131 <https://github.com/moremoban/pypi-mobans/issues/131>`_: remove useless
20+
statements when a complex installation requirement is in place.
21+
#. `#128 <https://github.com/moremoban/pypi-mobans/issues/128>`_: Exclude tests
22+
in installation package
23+
#. Install mock only on python 2
24+
425
0.0.8 - 13.10.2019
526
--------------------------------------------------------------------------------
627

README.rst

+16
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ pypi-mobans
88
.. image:: https://codecov.io/github/moremoban/pypi-mobans/coverage.png
99
:target: https://codecov.io/github/moremoban/pypi-mobans
1010

11+
1112
.. image:: https://img.shields.io/gitter/room/gitterHQ/gitter.svg
1213
:target: https://gitter.im/chfw_moban/Lobby
1314

@@ -63,6 +64,9 @@ Notes
6364
================================================================================
6465

6566

67+
Release and publish from command line
68+
--------------------------------------------------------------------------------
69+
6670
In order to run, `python setup.py publish`, you will have setup `.pypirc` in
6771
your home folder as::
6872

@@ -76,3 +80,15 @@ your home folder as::
7680

7781

7882
And you need to configure `gease`.
83+
84+
Auto publishing via github action
85+
--------------------------------------------------------------------------------
86+
87+
88+
In order to configure github to publish your package, you will need to set up
89+
two secrets::
90+
91+
PYPI_USERNAME
92+
PYPI_PASSWORD
93+
94+
Once you have done that, a github release will trigger an auto publishing.

changelog.yml

+16
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
11
name: pypi-mobans
22
organisation: moremoban
33
releases:
4+
- changes:
5+
- action: Added
6+
details:
7+
- "pypi download stats are displayed in README"
8+
- Add mit license text
9+
- "`#126`: support github auto pypi publishing action"
10+
- "`#133`: provide CI azure build yaml files"
11+
- action: Updated
12+
details:
13+
- Test on python 3.8 instead of python 3.8-dev
14+
- "`#131`: remove useless statements when a complex
15+
installation requirement is in place."
16+
- "`#128`: Exclude tests in installation package"
17+
- Install mock only on python 2
18+
date: 13.10.2019
19+
version: 0.0.9
420
- changes:
521
- action: Fixed
622
details:

mobanfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ configuration:
77
targets:
88
- .gitignore: gitignore.jj2
99
- .travis.yml: local-travis.yml.jj2
10-
- LICENSE: NEW_BSD_LICENSE.jj2
10+
- LICENSE: newbsd_license.jj2
1111
- README.rst: local-README.rst.jj2
1212
- output: CHANGELOG.rst
1313
configuration: changelog.yml

statics/azure/azure-pipelines.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Starter pipeline
2+
# Add steps that build, run tests, deploy, and more:
3+
# https://aka.ms/yaml
4+
jobs:
5+
- job: 'Windows'
6+
pool:
7+
vmImage: vs2017-win2016
8+
steps:
9+
- template: '.azure-pipelines-steps.yml'
10+
- job: 'MacOS'
11+
pool:
12+
vmImage: macOS-10.13
13+
steps:
14+
- template: '.azure-pipelines-steps-macos.yml'
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
steps:
2+
- task: UsePythonVersion@0
3+
displayName: 'Use Python 3.x'
4+
- script: |
5+
python -m pip install --upgrade pip setuptools wheel
6+
test ! -f rnd_requirements.txt || pip install -r rnd_requirements.txt
7+
pip install -r requirements.txt
8+
pip install -r tests/requirements.txt
9+
displayName: 'Setup dependencies'
10+
- script: |
11+
make
12+
displayName: 'Run tests'

statics/azure/pipelines-steps.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
steps:
2+
- task: UsePythonVersion@0
3+
displayName: 'Use Python 3.x'
4+
- script: |
5+
python -m pip install --upgrade pip setuptools wheel
6+
if exist rnd_requirements.txt pip install -r rnd_requirements.txt
7+
pip install -r requirements.txt
8+
pip install -r tests\requirements.txt
9+
displayName: 'Setup dependencies'
10+
- script: |
11+
test.bat
12+
displayName: 'Run tests'

statics/pythonpublish.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Upload Python Package
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v1
12+
- name: Set up Python
13+
uses: actions/setup-python@v1
14+
with:
15+
python-version: '3.x'
16+
- name: Install dependencies
17+
run: |
18+
python -m pip install --upgrade pip
19+
pip install setuptools wheel twine
20+
- name: Build and publish
21+
env:
22+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
23+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
24+
run: |
25+
python setup.py sdist bdist_wheel
26+
twine upload dist/*

templates/badges.rst.jj2

+8
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@
2323
.. image:: https://codecov.io/{{base_path}}{{suffix}}
2424
:target: https://codecov.io/{{base_path}}
2525

26+
{% if release != "0.0.0" %}
27+
.. image:: https://badge.fury.io/py/{{name}}.svg
28+
:target: https://pypi.org/project/{{name}}
29+
30+
.. image:: https://pepy.tech/badge/{{name}}/month
31+
:target: https://pepy.tech/project/{{name}}/month
32+
{% endif %}
33+
2634
{% if gitter_room %}
2735
.. image:: https://img.shields.io/gitter/room/gitterHQ/gitter.svg
2836
:target: https://gitter.im/{{gitter_room}}

templates/conf.py.jj2

+1
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,4 @@ intersphinx_mapping.update({
4949
{% block intersphinx_mapping %}
5050
{% endblock %}
5151
})
52+
master_doc = "index"

templates/mit_license.jj2

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) {{copyright_year}} {{company}}
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
File renamed without changes.

templates/setup.py.jj2

+12-15
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,22 @@
2424
{% endif %}
2525
{% endfor %}
2626
{% block header %}
27-
# Template by pypi-mobans
27+
"""
28+
Template by pypi-mobans
29+
"""
30+
2831
{% endblock %}
32+
import os
33+
import sys
2934
import codecs
3035
import locale
31-
import os
3236
import platform
33-
import sys
3437
from shutil import rmtree
3538

3639
{% if external_module_library %}
3740
from distutils.core import setup, Extension
3841
{% else %}
39-
from setuptools import Command, find_packages, setup
42+
from setuptools import Command, setup, find_packages
4043
{%endif%}
4144
{% if marker_dependencies and setup_use_markers and setup_use_markers_fix %}
4245
from setuptools import __version__ as setuptools_version
@@ -162,16 +165,16 @@ CLASSIFIERS = [
162165
"Programming Language :: Python :: 3.6",
163166
{% endif %}
164167

165-
{% if min_python_version <= ["3","7"] %}
168+
{%- if min_python_version <= ["3","7"] %}
166169
"Programming Language :: Python :: 3.7",
167170
{% endif %}
168171

169-
{% if min_python_version <= ["3","8"] %}
172+
{%- if min_python_version <= ["3","8"] %}
170173
"Programming Language :: Python :: 3.8",
171174
{% endif %}
172175

173-
{%block additional_classifiers%}
174-
{%endblock %}
176+
{% block additional_classifiers%}
177+
{% endblock %}
175178
]
176179

177180
{%macro handle_complex_dependency(complex_one) -%}
@@ -214,12 +217,6 @@ INSTALL_REQUIRES = [
214217
SETUP_COMMANDS = {}
215218
{% endblock %}
216219

217-
{% for dependency in dependencies: %}
218-
{% if not setup_use_markers and ';' in dependency: %}
219-
{{handle_complex_dependency(dependency)}}
220-
{% endif %}
221-
{% endfor %}
222-
223220
{% if external_module_library %}
224221
PYMODULE = Extension(
225222
'{{name}}',
@@ -231,7 +228,7 @@ PYMODULE = Extension(
231228
libraries=INSTALL_REQUIRES
232229
)
233230
{% else %}
234-
PACKAGES = find_packages(exclude=["ez_setup", "examples", "tests"])
231+
PACKAGES = find_packages(exclude=["ez_setup", "examples", "tests", "tests.*"])
235232
{% if extra_dependencies or dependencies: %}
236233
EXTRAS_REQUIRE = {
237234
{% for dependency in extra_dependencies: %}

templates/tests/requirements.txt.jj2

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
nose
2-
mock
2+
mock;python_version<"3"
33
codecov
44
coverage
55
flake8

templates/travis.yml.jj2

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ notifications:
1919
python:
2020
- &pypy2 pypy2.7-6.0
2121
- &pypy3 pypy3.5-6.0
22-
- 3.8-dev
22+
- 3.8
2323
- 3.7
2424
- 3.6
2525
- 3.5
+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: pypi-mobans
2+
nick_name: pypi-mobans
3+
copyright_year: 2018
4+
file_type: file type
5+
author: C.W.
6+
organisation: moremoban
7+
8+
license: NEW BSD
9+
company: Onni Software Ltd.
10+
branch: master
11+
description: Scaffolding templates for your Python project.
12+
release: 0.0.0
13+
gitter_room: chfw_moban/Lobby
14+
setup_py: false
15+
rsrcdir: docs/source
16+
rbuilddir: docs/_build
17+
version: 0.1.1rc3
18+
mastertocmaxdepth: 3
19+
lint_command: make install_test lint
20+
moban_command: make upstreaming git-diff-check
21+
test_command: pytest
22+
dependencies:
23+
- ruamel.yaml>=0.15.5,<=0.15.94;python_version == '3.4'
24+
- ruamel.yaml>=0.15.42;python_version == '3.7'
25+
setup_use_markers: false
+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: pypi-mobans
2+
nick_name: pypi-mobans
3+
copyright_year: 2018
4+
file_type: file type
5+
author: C.W.
6+
organisation: moremoban
7+
8+
license: NEW BSD
9+
company: Onni Software Ltd.
10+
branch: master
11+
description: Scaffolding templates for your Python project.
12+
release: 0.0.0
13+
gitter_room: chfw_moban/Lobby
14+
setup_py: false
15+
rsrcdir: docs/source
16+
rbuilddir: docs/_build
17+
version: 0.1.1rc3
18+
mastertocmaxdepth: 3
19+
lint_command: make install_test lint
20+
moban_command: make upstreaming git-diff-check
21+
test_command: pytest
22+
dependencies:
23+
- ruamel.yaml>=0.15.5,<=0.15.94;python_version == '3.4'
24+
- ruamel.yaml>=0.15.42;python_version == '3.7'
25+
setup_use_markers: true

0 commit comments

Comments
 (0)