Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wheel not universal #193

Merged
merged 9 commits into from Feb 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pkglts/pkg_cfg.json
Expand Up @@ -130,6 +130,6 @@
"version": {
"major": 5,
"minor": 1,
"post": 1
"post": 2
}
}
12 changes: 6 additions & 6 deletions .pkglts/pkg_hash.json
Expand Up @@ -30,7 +30,7 @@
"pysetup": "T0+K8kQXfN7mECB6vXJvk6QJEs6Xo7faTVLCxp8Srjmfd+nUmZAxt35tSIVO3OzPV7vopLZFe6HXGxhYVOONpQ=="
},
"README.rst": {
"doc": "06101GtHfNHjeZMsBpCMFUY8xDnWLLFKgIEIa4Q4ucZLuowGwHMAXGaPTkfeQXHpo2F7QWuEJ3TbpOCM+eNkRw=="
"doc": "K5Zn5g7vTVYNrDqBi72PJZ62S8XmQ5xauyp7nAiD0hE8G1PS8bzQjBpfPn2VHqnXPUTGHHdZNeFYB6NIzmESlA=="
},
"appveyor.yml": {
"appveyor": "5/T0A4182n2Zha7QLgdW4PRGtORCAuPwTw7Fb/sm/DgSRrWuco2aqUpuCV9j9wlmGZ5CM/dnT1zw+Lxn1Iv7Lg=="
Expand All @@ -43,7 +43,7 @@
},
"conda/meta.yaml": {
"conda.about": "6/RoaDh45Wwcc0uAhKGnUH46mczqPBQq/PV0cSCbe+fhiDQPOooOK8u24GzswyAcXIEHoASc/XIe+WS/2zBl5A==",
"conda.package": "J4tjWMzVcpqdubyoLB8pPcR3H53BGnZ3mAu9NgtYWzjkAr1zKq3lkNmA0I2Gvh+pVnNvpi8PHAaLQ/7i0ewc2A==",
"conda.package": "IrVvVF3Rb8SiXnoNmdON6EnFkmJqUQqAzR2bD5EogBvOaxVOOyjvjLHzIMYtEIEPwfrEl3L3/SH3CTbi/fZl5w==",
"conda.req_build": "PHQ4LRj963FIG00GtdBBsC4RGzQPqOz8nxsL3g3mCpe6xaYzXaEMD/Eifbbfi+X+Z578AJlr/Qsw4fgVokh+vQ==",
"conda.req_run": "tAHRVsBmpT3G6fyAPJkEHz1WG4680wzFomYI2F+7oMSggoS73xMjEXINojQRwtSEgNIbUvcWxht0663/LYY8Yw==",
"conda.src": "Lzbp176AVU0YantZQxB4LsR2jbxpZ/OlkvY2V4aWAEuzKEarh872uc1eRvsIYf/FsbxvcmUI84AezWlA72nI6A=="
Expand All @@ -63,7 +63,7 @@
"doc/_static/nonempty.txt": {},
"doc/authors.rst": {},
"doc/conf.py": {
"sphinx": "TUimNy7fdDAxC2YX1P4jPqbMD25qj402HYDd0Xy7dRiRMsK/eXqz0Dc87at3BplQjoQSvBQDjJ09qhT8+TForQ=="
"sphinx": "wxid7n6z/iEapvADxI5uC+V+AT5voqdsPP8ZUJQnZQuqIUCLaTEDg+dDWjKmi0rvs4WTLVhAaN7MW8w7aBRwDA=="
},
"doc/contributing.rst": {},
"doc/history.rst": {},
Expand Down Expand Up @@ -94,11 +94,11 @@
"sphinx": "mYLeHXWNqXwTk9eWxY4wTrltnDTrAHQvl0l+kosuIfAgrbAuhWMgySq4WR2Y855Q5HDAtGZY7Pnt+BAU6niXIg==",
"test.nose": "vmiIOMqGhuXJBom/KrWFzvETfJmbSMcLkvZ6XDTcFWl7XRHJgu1tcb4eHn97TgcziEqpfD96M5qO0DV3z3S+CQ==",
"test.pytest": "R5P5XMaQxSXsNQJ3hXYY45iLvnl8Mbec6XuIaFTum52gym+wTM2TfEbW/N2doHNaCkpdAWg07oblbYi15AwQkA==",
"wheel": "pZhz4563YE3KL0KwhzTKkYAC8VXT0uaEvVjwMWPNS0Sqo4THPmHeQkqlKsT2iVqTRN7LLW2f/hN836ZtQE4/+A=="
"wheel": "vUJZkCvbK4LQuEURneKnX/SNIwhJ9/9EaT5T6Uw1K1fauKFFiHnq1DTDES7cgBD0OANelyvwCCZO/rV4Iok+ag=="
},
"setup.py": {
"pysetup.call": "t30iIuCMd/sWxStR2XNYb8bCBgwanhKt8YYn2VKACyAqL5cKFRUWpVRIpAR+uxXUZ9PYYy2csMmECcONnRZE8w==",
"pysetup.kwds": "WrFejOlnEEIai+0sfJPLdCIWdoBAxHsXeNaEqyu2kOqMGzYpczsukIYnft8odBddG+u9wTGzqaUoTj3op60S4g=="
"pysetup.kwds": "QgoNpksIZ19uwjWSnx2Kpe3Qiqj/tClKwSCkkZ/csXygzkaV05Oy4sP9ycyM+RkFjPhOKC3AUSwb6GEwmkNuKA=="
},
"src/pkglts/__init__.py": {
"src": "L2dZgUBRC5qv3o09+1CbMcgYfQtR1ZNSvP8KlP8REQazZiAQAktALjpCC2ijdxvKPv/tN9KsZrzNW+lZMszSfg==",
Expand All @@ -108,7 +108,7 @@
"data": "wwgLuV/OqHWjWbssvDHa4LNg+7C+tuNiKHOxkO+9UAl9opI/HfPyJAq2fPhUeTmVvb/E6MkqDJIli9m8n5/V0Q=="
},
"src/pkglts/version.py": {
"version": "J7PegCgWk9NAQevDwZ1dPz6McE2t4/g4bc0bsgcU+1o3QVthuT+KeaZL/i4NNV66B9kOATPZ2jyilhKD+NZ0Eg=="
"version": "MwUmKlEaNplofnUafx8m2d62xxyN3flLhNJap38CzrtAC2KybFaw2KT+ZcnrGR1fq+Ksk6NSWFEvbeMSQ2E2lg=="
},
"src/pkglts_data/__init__.py": {},
"test/__init__.py": {},
Expand Down
50 changes: 25 additions & 25 deletions .pkglts/pkg_version.json
@@ -1,27 +1,27 @@
{
"appveyor": "5.1.0",
"base": "5.1.0",
"conda": "5.1.0",
"coverage": "5.1.0",
"coveralls": "5.1.0",
"data": "5.1.0",
"doc": "5.1.0",
"flake8": "5.1.0",
"git": "5.1.0",
"github": "5.1.0",
"landscape": "5.1.0",
"lgtm": "5.1.0",
"license": "5.1.0",
"notebook": "5.1.0",
"pypi": "5.1.0",
"pysetup": "5.1.0",
"readthedocs": "5.1.0",
"reqs": "5.1.0",
"requires": "5.1.0",
"sphinx": "5.1.0",
"src": "5.1.0",
"test": "5.1.0",
"tox": "5.1.0",
"travis": "5.1.0",
"version": "5.1.0"
"appveyor": "5.1.1",
"base": "5.1.1",
"conda": "5.1.1",
"coverage": "5.1.1",
"coveralls": "5.1.1",
"data": "5.1.1",
"doc": "5.1.1",
"flake8": "5.1.1",
"git": "5.1.1",
"github": "5.1.1",
"landscape": "5.1.1",
"lgtm": "5.1.1",
"license": "5.1.1",
"notebook": "5.1.1",
"pypi": "5.1.1",
"pysetup": "5.1.1",
"readthedocs": "5.1.1",
"reqs": "5.1.1",
"requires": "5.1.1",
"sphinx": "5.1.1",
"src": "5.1.1",
"test": "5.1.1",
"tox": "5.1.1",
"travis": "5.1.1",
"version": "5.1.1"
}
40 changes: 20 additions & 20 deletions README.rst
Expand Up @@ -5,16 +5,36 @@ pkglts
.. {# pkglts, doc


.. image:: https://ci.appveyor.com/api/projects/status/hrwjhn2oe0q4oaf2/branch/master?svg=true
:alt: Appveyor build status
:target: https://ci.appveyor.com/project/revesansparole/pkglts/branch/master


.. image:: https://img.shields.io/lgtm/grade/python/g/revesansparole/pkglts.svg?logo=lgtm&logoWidth=18
:alt: Language grade: Python
:target: https://lgtm.com/projects/g/revesansparole/pkglts/context:python


.. image:: https://coveralls.io/repos/github/revesansparole/pkglts/badge.svg?branch=master
:alt: Coverage report status
:target: https://coveralls.io/github/revesansparole/pkglts?branch=master


.. image:: https://landscape.io/github/revesansparole/pkglts/master/landscape.svg?style=flat
:alt: Code health status
:target: https://landscape.io/github/revesansparole/pkglts/master


.. image:: https://readthedocs.org/projects/pkglts/badge/?version=latest
:alt: Documentation status
:target: https://pkglts.readthedocs.io/en/latest/?badge=latest


.. image:: https://travis-ci.org/revesansparole/pkglts.svg?branch=master
:alt: Travis build status
:target: https://travis-ci.org/revesansparole/pkglts


.. image:: https://requires.io/github/revesansparole/pkglts/requirements.svg?branch=master
:alt: Requirements status
:target: https://requires.io/github/revesansparole/pkglts/requirements/?branch=master
Expand All @@ -23,26 +43,6 @@ pkglts
.. image:: https://badge.fury.io/py/pkglts.svg
:alt: PyPI version
:target: https://badge.fury.io/py/pkglts


.. image:: https://landscape.io/github/revesansparole/pkglts/master/landscape.svg?style=flat
:alt: Code health status
:target: https://landscape.io/github/revesansparole/pkglts/master


.. image:: https://ci.appveyor.com/api/projects/status/hrwjhn2oe0q4oaf2/branch/master?svg=true
:alt: Appveyor build status
:target: https://ci.appveyor.com/project/revesansparole/pkglts/branch/master


.. image:: https://coveralls.io/repos/github/revesansparole/pkglts/badge.svg?branch=master
:alt: Coverage report status
:target: https://coveralls.io/github/revesansparole/pkglts?branch=master


.. image:: https://travis-ci.org/revesansparole/pkglts.svg?branch=master
:alt: Travis build status
:target: https://travis-ci.org/revesansparole/pkglts
.. #}

.. image:: https://anaconda.org/revesansparole/pkglts/badges/version.svg
Expand Down
2 changes: 1 addition & 1 deletion conda/meta.yaml
@@ -1,7 +1,7 @@
# {# pkglts, conda.package
package:
name: pkglts
version: "5.1.1"
version: "5.1.2"
# #}

# {# pkglts, conda.src
Expand Down
4 changes: 2 additions & 2 deletions doc/conf.py
Expand Up @@ -97,9 +97,9 @@
#

# The short X.Y version.
version = "5.1.1"
version = "5.1.2"
# The full version, including alpha/beta/rc tags.
release = "5.1.1"
release = "5.1.2"


# The language for content autogenerated by Sphinx. Refer to documentation
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Expand Up @@ -7,7 +7,7 @@ exclude = example, wip

# {# pkglts, wheel
[bdist_wheel]
universal = 1

# #}
# {# pkglts, sphinx
[build_sphinx]
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -24,7 +24,7 @@

setup_kwds = dict(
name='pkglts',
version="5.1.1",
version="5.1.2",
description=short_descr,
long_description=readme + '\n\n' + history,
author="revesansparole",
Expand Down
5 changes: 4 additions & 1 deletion src/pkglts/option/pysetup/option.py
Expand Up @@ -32,9 +32,12 @@ def require_option(self):
def environment_extensions(self, cfg):
py_min_ver = sorted(cfg[self._name]['intended_versions'])[0]

universal = len(set(ver[0] for ver in cfg[self._name]['intended_versions'])) > 1

return {
"pkg_url": pkg_url(cfg),
"py_min_ver": ".".join(tuple(py_min_ver))
"py_min_ver": ".".join(tuple(py_min_ver)),
"universal": universal
}


Expand Down
2 changes: 2 additions & 0 deletions src/pkglts/option/pysetup/resource/setup.cfg
Expand Up @@ -3,5 +3,7 @@

# {# pkglts, wheel
[bdist_wheel]
{% if pysetup.universal %}
universal = 1
{% endif %}
# #}
2 changes: 1 addition & 1 deletion src/pkglts/version.py
Expand Up @@ -10,7 +10,7 @@
MINOR = 1
"""(int) Version minor component."""

POST = 1
POST = 2
"""(int) Version post or bugfix component."""

__version__ = f"{MAJOR:d}.{MINOR:d}.{POST:d}"
Expand Down
10 changes: 4 additions & 6 deletions test/test_manage_regenerate.py
Expand Up @@ -73,9 +73,8 @@ def test_regenerate_handle_conflicts_keep(tmp_pths, mocker):

init_file.write_text("modified")

with mocker.patch('pkglts.manage.get_user_permission',
return_value=False):
regenerate_package(cfg, tmp_dir)
mocker.patch('pkglts.manage.get_user_permission', return_value=False)
regenerate_package(cfg, tmp_dir)

assert init_file.read_text() == "modified"

Expand All @@ -86,9 +85,8 @@ def test_regenerate_handle_conflicts_overwrite(tmp_pths, mocker):

addendum(init_file)

with mocker.patch('pkglts.manage.get_user_permission',
return_value=True):
regenerate_package(cfg, tmp_dir)
mocker.patch('pkglts.manage.get_user_permission', return_value=True)
regenerate_package(cfg, tmp_dir)

assert "modified" not in init_file.read_text()

Expand Down
10 changes: 5 additions & 5 deletions test/test_manage_tools_update_option.py
Expand Up @@ -37,11 +37,11 @@ def test_option_use_default_from_config():
# def test_option_prompt_user_if_global_config_ask_for_it(mocker):
# pkg_cfg = dict(_pkglts={'use_prompts': True})
#
# with mocker.patch('pkglts.option_tools.loc_input', return_value=''):
# pkg_cfg = update_opt('base', pkg_cfg)
# assert 'base' in pkg_cfg
# cfg = pkg_cfg['base']
# assert cfg['owner'] == 'moi'
# mocker.patch('pkglts.option_tools.loc_input', return_value='')
# pkg_cfg = update_opt('base', pkg_cfg)
# assert 'base' in pkg_cfg
# cfg = pkg_cfg['base']
# assert cfg['owner'] == 'moi'


# def test_option_pass_environment_to_config():
Expand Down
18 changes: 9 additions & 9 deletions test/test_option/test_git/test_handlers.py
Expand Up @@ -2,16 +2,16 @@


def test_contributors_with_failed_request(mocker):
with mocker.patch('subprocess.check_output', side_effect=KeyError):
cfg = Config(dict(git={}))
cfg.load_extra()
assert "failed" in cfg._env.globals['git'].contributors[0]
mocker.patch('subprocess.check_output', side_effect=KeyError)
cfg = Config(dict(git={}))
cfg.load_extra()
assert "failed" in cfg._env.globals['git'].contributors[0]


def test_contributors_without_failed_request(mocker):
commits = b'commit Author: a <toto@titi>\n, commit: Author: b <tata@titi>\n, commit: Author: b <tata@titi>\n'
with mocker.patch('subprocess.check_output', return_value=commits):
cfg = Config(dict(git={}))
cfg.load_extra()
contributors = cfg._env.globals['git'].contributors
assert len(contributors) == 2
mocker.patch('subprocess.check_output', return_value=commits)
cfg = Config(dict(git={}))
cfg.load_extra()
contributors = cfg._env.globals['git'].contributors
assert len(contributors) == 2
8 changes: 4 additions & 4 deletions test/test_option/test_version/test_handlers.py
Expand Up @@ -11,7 +11,7 @@
# def import_call(*args):
# print args
#
# with mocker.patch("pkglts.option.version.handlers.__builtins__",
# new_callable=import_call):
# # from pkglts.option.version.handlers import fetch_github_version
# assert fetch_github_version == "0"
# mocker.patch("pkglts.option.version.handlers.__builtins__",
# new_callable=import_call)
# # from pkglts.option.version.handlers import fetch_github_version
# assert fetch_github_version == "0"