From 51cd94be03d6ed801a902828d65ee19727ff717c Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Thu, 31 Jan 2019 11:16:55 +0100 Subject: [PATCH 01/52] =?UTF-8?q?=F0=9F=8E=89=F0=9F=8E=A8=20Add=20the=20fo?= =?UTF-8?q?rtunate=20installer=20initial=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 389 ++++++++++++++++++++++++++++++++++++++ LICENSE.md | 30 +++ README.rst | 18 ++ fortunate_pkg/__init__.py | 27 +++ fortunate_pkg/__main__.py | 5 + setup.cfg | 41 ++++ setup.py | 16 ++ 7 files changed, 526 insertions(+) create mode 100644 .gitignore create mode 100644 LICENSE.md create mode 100644 README.rst create mode 100644 fortunate_pkg/__init__.py create mode 100644 fortunate_pkg/__main__.py create mode 100644 setup.cfg create mode 100644 setup.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000000..1e7ef8f2839 --- /dev/null +++ b/.gitignore @@ -0,0 +1,389 @@ + +# Created by https://www.gitignore.io/api/git,linux,pydev,python,windows,pycharm+all,jupyternotebook,vim,webstorm,emacs +# Edit at https://www.gitignore.io/?templates=git,linux,pydev,python,windows,pycharm+all,jupyternotebook,vim,webstorm,emacs + +### Emacs ### +# -*- mode: gitignore; -*- +*~ +\#*\# +/.emacs.desktop +/.emacs.desktop.lock +*.elc +auto-save-list +tramp +.\#* + +# Org-mode +.org-id-locations +*_archive + +# flymake-mode +*_flymake.* + +# eshell files +/eshell/history +/eshell/lastdir + +# elpa packages +/elpa/ + +# reftex files +*.rel + +# AUCTeX auto folder +/auto/ + +# cask packages +.cask/ +dist/ + +# Flycheck +flycheck_*.el + +# server auth directory +/server/ + +# projectiles files +.projectile + +# directory configuration +.dir-locals.el + +# network security +/network-security.data + + +### Git ### +# Created by git for backups. To disable backups in Git: +# $ git config --global mergetool.keepBackup false +*.orig + +# Created by git when using merge tools for conflicts +*.BACKUP.* +*.BASE.* +*.LOCAL.* +*.REMOTE.* +*_BACKUP_*.txt +*_BASE_*.txt +*_LOCAL_*.txt +*_REMOTE_*.txt + +### JupyterNotebook ### +.ipynb_checkpoints +*/.ipynb_checkpoints/* + +# Remove previous ipynb_checkpoints +# git rm -r .ipynb_checkpoints/ +# + +### Linux ### + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +### PyCharm+all ### +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/modules.xml +# .idea/*.iml +# .idea/modules + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + +### PyCharm+all Patch ### +# Ignores the whole .idea folder and all .iml files +# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360 + +.idea/ + +# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023 + +*.iml +modules.xml +.idea/misc.xml +*.ipr + +### pydev ### +.pydevproject + +### Python ### +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook + +# IPython +profile_default/ +ipython_config.py + +# pyenv +.python-version + +# celery beat schedule file +celerybeat-schedule + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +### Python Patch ### +.venv/ + +### Vim ### +# Swap +[._]*.s[a-v][a-z] +[._]*.sw[a-p] +[._]s[a-rt-v][a-z] +[._]ss[a-gi-z] +[._]sw[a-p] + +# Session +Session.vim + +# Temporary +.netrwhist +# Auto-generated tag files +tags +# Persistent undo +[._]*.un~ + +### WebStorm ### +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff + +# Generated files + +# Sensitive or high-churn files + +# Gradle + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/modules.xml +# .idea/*.iml +# .idea/modules + +# CMake + +# Mongo Explorer plugin + +# File-based project format + +# IntelliJ + +# mpeltonen/sbt-idea plugin + +# JIRA plugin + +# Cursive Clojure plugin + +# Crashlytics plugin (for Android Studio and IntelliJ) + +# Editor-based Rest Client + +# Android studio 3.1+ serialized cache file + +### WebStorm Patch ### +# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 + +# *.iml +# modules.xml +# .idea/misc.xml +# *.ipr + +# Sonarlint plugin +.idea/sonarlint + +### Windows ### +# Windows thumbnail cache files +Thumbs.db +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# End of https://www.gitignore.io/api/git,linux,pydev,python,windows,pycharm+all,jupyternotebook,vim,webstorm,emacs diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 00000000000..d4a4da3729f --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,30 @@ +Copyright © 2019, Sviatoslav Sydorenko (wk+open-source@sydorenko.org.ua) + +All rights reserved. + +* * * + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of CherryPy nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/README.rst b/README.rst new file mode 100644 index 00000000000..60d7c7dd071 --- /dev/null +++ b/README.rst @@ -0,0 +1,18 @@ +This is a failure-ignoring installer. + +Status +====== + +Experimental. + +Contribute Fortunate Pkg +======================== +**Want to add something to upstream?** Feel free to submit a PR or file an issue +if unsure. +Note that PR is more likely to be accepted if it includes tests and detailed +description helping maintainers to understand it better :tada: + +Oh, and be pythonic, please :snake: + +**Don't know how?** Check out `How to Contribute to Open Source +`_ article by GitHub :rocket: diff --git a/fortunate_pkg/__init__.py b/fortunate_pkg/__init__.py new file mode 100644 index 00000000000..ad371b7bff3 --- /dev/null +++ b/fortunate_pkg/__init__.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +"""Fortunate dist installer.""" + +from __future__ import absolute_import, division, print_function +__metadata__ = type + +import subprocess +import sys + + +def maybe_install_pkgs(*pkgs): + """Try installing a Python dist ignoring failures.""" + if not pkgs: + pkgs = sys.argv[1:] + + if not pkgs: + print(u'😉 Nothing to install, skipping...', file=sys.stderr) + return + + pip_install_cmd = ('pip', 'install') + tuple(*pkgs) + print(u'🛈 Running {0!s}...'.format(pip_install_cmd), file=sys.stderr) + rc = subprocess.call(pip_install_cmd) + + if rc: + print(u'😉 Installation failed, ignoring...', file=sys.stderr) + else: + print(u'😄 Installation succeeded...', file=sys.stderr) diff --git a/fortunate_pkg/__main__.py b/fortunate_pkg/__main__.py new file mode 100644 index 00000000000..0d6cc5a0485 --- /dev/null +++ b/fortunate_pkg/__main__.py @@ -0,0 +1,5 @@ +#! /usr/bin/env python +"""A CLI for installing a Python dists if fortune smiles on you.""" + + +__name__ == '__main__' and maybe_install_pkgs() diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 00000000000..73fb172fbd8 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,41 @@ +[bdist_wheel] +universal = 1 + +[metadata] +author = Sviatoslav Sydorenko +author_email = wk+open-source@sydorenko.org.ua +classifiers = + Development Status :: 5 - Production/Stable + Intended Audience :: Developers + Operating System :: OS Independent + License :: OSI Approved :: BSD License + Programming Language :: Python + Programming Language :: Python :: 2 + Programming Language :: Python :: 2.6 + Programming Language :: Python :: 2.7 + Programming Language :: Python :: 3 + Programming Language :: Python :: 3.4 + Programming Language :: Python :: 3.5 + Programming Language :: Python :: 3.6 + Programming Language :: Python :: 3.7 + Programming Language :: Python :: Implementation + Programming Language :: Python :: Implementation :: CPython + Programming Language :: Python :: Implementation :: Jython + Programming Language :: Python :: Implementation :: PyPy +description = Failure-ignoring installer +keywords = + hack + package + installer +license_file = LICENSE.md +long_description = file: README.rst +name = fortunate_pkg + +[options] +include_package_data = True +packages = find: +python_requires = >=2.6,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.* + +[options.entry_points] +console_scripts = + fortunate_pkg = fortunate_pkg.__main__:maybe_install_pkgs diff --git a/setup.py b/setup.py new file mode 100644 index 00000000000..156a0a3b3a7 --- /dev/null +++ b/setup.py @@ -0,0 +1,16 @@ +#! /usr/bin/env python +"""Setup spec for the Python dist.""" + +from setuptools import setup + + +setup_kwargs = { + 'use_scm_version': True, + 'setup_requires': [ + 'setuptools_scm>=1.15.0', + 'setuptools_scm_git_archive>=1.0', + ], +} + + +__name__ == '__main__' and setup(**setup_kwargs) From 157c528ffe39509c967e790962233b3b9d933b70 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Thu, 31 Jan 2019 11:26:13 +0100 Subject: [PATCH 02/52] =?UTF-8?q?=F0=9F=91=B7=20Add=20a=20Travis=20CI=20co?= =?UTF-8?q?nfig?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .travis.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000000..2be4a6b14dd --- /dev/null +++ b/.travis.yml @@ -0,0 +1,34 @@ +conditions: v1 +dist: xenial +language: python + +python: +- 3.7 + +install: +- skip # TODO: install test dependencies + +script: +- skip # TODO: run pytest + +jobs: + include: + - stage: &stage_deploy_name upload new version of python package to PYPI (only for tagged commits) + if: tag IS present + install: skip + script: skip + deploy: + provider: pypi + on: + all_branches: true + tags: true + user: webknjaz + password: + secure: >- + yXr/zrIul5ejG6HdWPm5Hr71KEaeuSZ1SfvurBkW7psoAEpH6x75tJfym+EZQvGRcEyk/OKGq1Vq2W3eAznVI6ZZ903M2KX7JuNnQ1a88PLKGAwFQVAHCDehL/DWFCypL7IsxHRsaARHm9TXxE2AifEZVi4l2w9u+Yaxra3CpNiR8F93RoaGRtV8XWCSPoZhEgpRB2og5R10IlsK0TvkZmVSDBReYl49WWzLIV4b+PlA483qPiXDyobsbWolQHN2yx8Dao53jYKOwLi9+ZWHbWriB4dijAznIUXksuFJgOlXDinVhVPa+nRo+rPxWzk8Y21s9y/IwlpsWQkvtoca14wx127CxYifPvcS7AhiLcdpWO6N+mrullGZxP0K/Yv/I9JD2FatJVwnWEhKqZg5zD97+z290xOfVHkmgJKyOob9Rz3BMQawi1QgRrl1vxG2xMgaNikBTc6oUkCAajldtCgfTpSaM+Q71ayVwBy5NJuQQldZChzkCWbMeWEWOInUlO+WsMrbJtsAml5QPf6kxf24uu2hUqHghfvHH+TNj/5fN+BkSPKTWeAzdUP8tJVD0SnK/ttJ2BgO9KsSaz1W3n1PM46uzgRe9kAsazLeAC7mArNI+J9E1uMuI16xObFjPlbJ5oF3Ulqkpb93m9PpmhGXY6L8bmO+EkNi4Fhp/BE= + distributions: clean --all sdist bdist_wheel + skip_cleanup: true + skip_upload_docs: true + +cache: + pip: true From f5805420d2332699162bd3f8f22625e9053300a7 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Thu, 31 Jan 2019 11:36:26 +0100 Subject: [PATCH 03/52] Install Cython in isolated env using fortunate-pkg --- pyproject.toml | 3 +++ setup.py | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index e666dfc174e..fb3fbeba5fe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,6 @@ +[build-system] +requires = ["fortunate-pkg"] + [tool.towncrier] package = "aiohttp" filename = "CHANGES.rst" diff --git a/setup.py b/setup.py index 5f477ef0824..cdca478cf29 100644 --- a/setup.py +++ b/setup.py @@ -7,6 +7,13 @@ DistutilsPlatformError) from setuptools import Extension, setup +try: + from fortunate_pkg import maybe_install_pkgs +except ImportError: + import os + os.system('echo "Running outside of pip\'s isolated virtualenv."') +else: + maybe_install_pkgs(('cython', )) if sys.version_info < (3, 5, 3): From 45df12900a5e5d48793e3180b36c54991ab261c6 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Thu, 31 Jan 2019 11:50:04 +0100 Subject: [PATCH 04/52] =?UTF-8?q?=F0=9F=93=9D=20Add=20project=20URLs=20to?= =?UTF-8?q?=20the=20dist=20meta?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setup.cfg b/setup.cfg index 73fb172fbd8..661f5437bd0 100644 --- a/setup.cfg +++ b/setup.cfg @@ -30,6 +30,10 @@ keywords = license_file = LICENSE.md long_description = file: README.rst name = fortunate_pkg +project_urls = + CI: Travis = https://travis-ci.com/webknjaz/fortunate-pkg + GitHub: issues = https://github.com/webknjaz/fortunate-pkg/issues + GitHub: repo = https://github.com/webknjaz/fortunate-pkg [options] include_package_data = True From 6de8265f9d616eff303c353fe3edfc38e20c4c83 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Thu, 31 Jan 2019 11:52:46 +0100 Subject: [PATCH 05/52] Add Travis CI and PyPI badges to README --- README.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.rst b/README.rst index 60d7c7dd071..c9896981266 100644 --- a/README.rst +++ b/README.rst @@ -1,3 +1,9 @@ +.. image:: https://img.shields.io/pypi/v/fortunate-pkg.svg + :target: https://pypi.org/project/fortunate-pkg + +.. image:: https://img.shields.io/travis/com/webknjaz/fortunate-pkg/master.svg?label=Linux%20build%20%40%20Travis%20CI + :target: https://travis-ci.com/webknjaz/fortunate-pkg + This is a failure-ignoring installer. Status From 729f9f9fdaa74a5b72c8798510da8b5bb9771ebe Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Mon, 15 Apr 2019 01:39:56 +0200 Subject: [PATCH 06/52] Add an in-tree PEP 517 build backend --- {build_aiohttp => build-aiohttp}/.gitignore | 0 {build_aiohttp => build-aiohttp}/.travis.yml | 0 {build_aiohttp => build-aiohttp}/LICENSE.md | 0 {build_aiohttp => build-aiohttp}/README.rst | 8 +-- .../build_aiohttp}/__init__.py | 22 ++++-- .../build_aiohttp}/__main__.py | 0 build-aiohttp/build_aiohttp/api.py | 69 +++++++++++++++++++ {build_aiohttp => build-aiohttp}/setup.cfg | 18 +++-- build-aiohttp/setup.py | 7 ++ build_aiohttp/setup.py | 16 ----- pyproject.toml | 14 +++- setup.py | 13 ++-- 12 files changed, 124 insertions(+), 43 deletions(-) rename {build_aiohttp => build-aiohttp}/.gitignore (100%) rename {build_aiohttp => build-aiohttp}/.travis.yml (100%) rename {build_aiohttp => build-aiohttp}/LICENSE.md (100%) rename {build_aiohttp => build-aiohttp}/README.rst (61%) rename {build_aiohttp/fortunate_pkg => build-aiohttp/build_aiohttp}/__init__.py (50%) rename {build_aiohttp/fortunate_pkg => build-aiohttp/build_aiohttp}/__main__.py (100%) create mode 100644 build-aiohttp/build_aiohttp/api.py rename {build_aiohttp => build-aiohttp}/setup.cfg (79%) create mode 100644 build-aiohttp/setup.py delete mode 100644 build_aiohttp/setup.py diff --git a/build_aiohttp/.gitignore b/build-aiohttp/.gitignore similarity index 100% rename from build_aiohttp/.gitignore rename to build-aiohttp/.gitignore diff --git a/build_aiohttp/.travis.yml b/build-aiohttp/.travis.yml similarity index 100% rename from build_aiohttp/.travis.yml rename to build-aiohttp/.travis.yml diff --git a/build_aiohttp/LICENSE.md b/build-aiohttp/LICENSE.md similarity index 100% rename from build_aiohttp/LICENSE.md rename to build-aiohttp/LICENSE.md diff --git a/build_aiohttp/README.rst b/build-aiohttp/README.rst similarity index 61% rename from build_aiohttp/README.rst rename to build-aiohttp/README.rst index c9896981266..e7c8fb34f9c 100644 --- a/build_aiohttp/README.rst +++ b/build-aiohttp/README.rst @@ -1,9 +1,3 @@ -.. image:: https://img.shields.io/pypi/v/fortunate-pkg.svg - :target: https://pypi.org/project/fortunate-pkg - -.. image:: https://img.shields.io/travis/com/webknjaz/fortunate-pkg/master.svg?label=Linux%20build%20%40%20Travis%20CI - :target: https://travis-ci.com/webknjaz/fortunate-pkg - This is a failure-ignoring installer. Status @@ -11,7 +5,7 @@ Status Experimental. -Contribute Fortunate Pkg +Contribute build_aiohttp ======================== **Want to add something to upstream?** Feel free to submit a PR or file an issue if unsure. diff --git a/build_aiohttp/fortunate_pkg/__init__.py b/build-aiohttp/build_aiohttp/__init__.py similarity index 50% rename from build_aiohttp/fortunate_pkg/__init__.py rename to build-aiohttp/build_aiohttp/__init__.py index ad371b7bff3..58d42fb8842 100644 --- a/build_aiohttp/fortunate_pkg/__init__.py +++ b/build-aiohttp/build_aiohttp/__init__.py @@ -8,7 +8,7 @@ import sys -def maybe_install_pkgs(*pkgs): +def maybe_install_pkgs(*pkgs, where=None): """Try installing a Python dist ignoring failures.""" if not pkgs: pkgs = sys.argv[1:] @@ -17,11 +17,21 @@ def maybe_install_pkgs(*pkgs): print(u'😉 Nothing to install, skipping...', file=sys.stderr) return - pip_install_cmd = ('pip', 'install') + tuple(*pkgs) - print(u'🛈 Running {0!s}...'.format(pip_install_cmd), file=sys.stderr) - rc = subprocess.call(pip_install_cmd) + print(u'😄 Installing {0!s}...'.format(', '.join(pkgs)), file=sys.stderr) + + pip_install_prefix = () + if where is not None: + pip_install_prefix = '--prefix', str(where) - if rc: - print(u'😉 Installation failed, ignoring...', file=sys.stderr) + pip_install_cmd = ( + 'pip', 'install', '--ignore-installed', + '--no-warn-script-location', + ) + pip_install_prefix + tuple(pkgs) + + print(u'🛈 Running {0!s}...'.format(pip_install_cmd), file=sys.stderr) + try: + subprocess.call(pip_install_cmd) + except subprocess.CalledProcessError: + print(u'😔 Installation failed, ignoring...', file=sys.stderr) else: print(u'😄 Installation succeeded...', file=sys.stderr) diff --git a/build_aiohttp/fortunate_pkg/__main__.py b/build-aiohttp/build_aiohttp/__main__.py similarity index 100% rename from build_aiohttp/fortunate_pkg/__main__.py rename to build-aiohttp/build_aiohttp/__main__.py diff --git a/build-aiohttp/build_aiohttp/api.py b/build-aiohttp/build_aiohttp/api.py new file mode 100644 index 00000000000..e48cc469449 --- /dev/null +++ b/build-aiohttp/build_aiohttp/api.py @@ -0,0 +1,69 @@ +"""PEP 517 build backend pre-installing extra build deps if possible.""" +import functools +import os +import pathlib + +from setuptools.build_meta import ( + build_sdist, + build_wheel, + get_requires_for_build_sdist, + get_requires_for_build_wheel, + prepare_metadata_for_build_wheel, +) +import toml + +from . import maybe_install_pkgs + + +def get_optional_build_deps(): + """Grab optional build dependencies from pyproject.toml config. + + This basically reads entries from: + + [tool.fortunate-pkg.build-system] + optionally-requires = ["optional-dist"] + """ + cwd_path = os.path.realpath(os.getcwd()) + with open(os.path.join(cwd_path, 'pyproject.toml')) as config_file: + pyproject_config = toml.load(config_file) + return ( + pyproject_config['tool']['fortunate-pkg']['build-system']. + get('optionally-requires', []) + ) + + +def get_build_env_location(): + """Identify the current virtualenv path. + + Based on the current file path, find out where it's installed. This + method seems to be more reliable than others. + + Other ways to do this include: + 1) Using ``__file__`` from ``pip`` and ``setuptools`` + 2) Grabbing the value of the ``PYTHONPATH`` environment variable + """ + overlay_venv_path = ( + pathlib.Path(__file__) / '..' / '..' / '..' / '..' / '..' + ).resolve() + return overlay_venv_path + + +def try_having_optional_build_deps(f): + """Try installing optional build deps ignoring the outcome. + + The list is sourced from: + + [tool.fortunate-pkg.build-system] + optionally-requires = ["optional-dist"] + """ + @functools.wraps(f) + def w(*args, **kwargs): + optional_build_deps = get_optional_build_deps() + build_env_location = get_build_env_location() + maybe_install_pkgs(*optional_build_deps, where=build_env_location) + return f(*args, **kwargs) + return w + + +build_sdist = try_having_optional_build_deps(build_sdist) +build_wheel = try_having_optional_build_deps(build_wheel) diff --git a/build_aiohttp/setup.cfg b/build-aiohttp/setup.cfg similarity index 79% rename from build_aiohttp/setup.cfg rename to build-aiohttp/setup.cfg index 661f5437bd0..241865a686c 100644 --- a/build_aiohttp/setup.cfg +++ b/build-aiohttp/setup.cfg @@ -29,17 +29,25 @@ keywords = installer license_file = LICENSE.md long_description = file: README.rst -name = fortunate_pkg +name = build_aiohttp project_urls = - CI: Travis = https://travis-ci.com/webknjaz/fortunate-pkg - GitHub: issues = https://github.com/webknjaz/fortunate-pkg/issues - GitHub: repo = https://github.com/webknjaz/fortunate-pkg + GitHub: issues = https://github.com/aio-libs/aiohttp/issues + GitHub: repo = https://github.com/aio-libs/aiohttp +version = 0.0.1 [options] include_package_data = True +install_requires = + pip packages = find: python_requires = >=2.6,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.* +[options.extras_require] +pep517 = + setuptools>=41.0.0 + toml + wheel + [options.entry_points] console_scripts = - fortunate_pkg = fortunate_pkg.__main__:maybe_install_pkgs + build_aiohttp = build_aiohttp.__main__:maybe_install_pkgs diff --git a/build-aiohttp/setup.py b/build-aiohttp/setup.py new file mode 100644 index 00000000000..eea3d8a6d71 --- /dev/null +++ b/build-aiohttp/setup.py @@ -0,0 +1,7 @@ +#! /usr/bin/env python +"""Setup spec for the Python dist.""" + +from setuptools import setup + + +__name__ == '__main__' and setup() diff --git a/build_aiohttp/setup.py b/build_aiohttp/setup.py deleted file mode 100644 index 156a0a3b3a7..00000000000 --- a/build_aiohttp/setup.py +++ /dev/null @@ -1,16 +0,0 @@ -#! /usr/bin/env python -"""Setup spec for the Python dist.""" - -from setuptools import setup - - -setup_kwargs = { - 'use_scm_version': True, - 'setup_requires': [ - 'setuptools_scm>=1.15.0', - 'setuptools_scm_git_archive>=1.0', - ], -} - - -__name__ == '__main__' and setup(**setup_kwargs) diff --git a/pyproject.toml b/pyproject.toml index fb3fbeba5fe..9afb4136997 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,17 @@ [build-system] -requires = ["fortunate-pkg"] +#requires = ["../fortunate_pkg"] +#requires = ["fortunate-pkg", "setuptools>=40.2", "wheel"] +requires = ["./build-aiohttp[pep517]"] + +#build-backend = "setuptools.build_meta" +build-backend = "build_aiohttp.api" + +# NOTE: in-tree backend path usage is not yet implemented in pip +# Ref: https://www.python.org/dev/peps/pep-0517/#in-tree-build-backends +backend-path = "./build-aiohttp" + +[tool.fortunate-pkg.build-system] +optionally-requires = ["Cython"] [tool.towncrier] package = "aiohttp" diff --git a/setup.py b/setup.py index cdca478cf29..089ff56e96e 100644 --- a/setup.py +++ b/setup.py @@ -7,13 +7,6 @@ DistutilsPlatformError) from setuptools import Extension, setup -try: - from fortunate_pkg import maybe_install_pkgs -except ImportError: - import os - os.system('echo "Running outside of pip\'s isolated virtualenv."') -else: - maybe_install_pkgs(('cython', )) if sys.version_info < (3, 5, 3): @@ -23,11 +16,15 @@ try: from Cython.Build import cythonize + print('😄 Cython got imported.') USE_CYTHON = True except ImportError: + print('😔 Cython import failed.', file=sys.stderr) USE_CYTHON = False -if (here / '.git').exists() and not USE_CYTHON: +IS_BUILD = {'sdist', 'bdist_wheel'}.intersection(sys.argv) + +if IS_BUILD and (here / '.git').exists() and not USE_CYTHON: print("Install cython when building from git clone", file=sys.stderr) print("Hint:", file=sys.stderr) print(" pip install cython", file=sys.stderr) From 050850b0294b731ca49f53795b0f597c98b27c2f Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Mon, 15 Apr 2019 12:59:19 +0200 Subject: [PATCH 07/52] Set appveyor encoding to utf-8 --- .appveyor.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.appveyor.yml b/.appveyor.yml index bde21d9e32e..36f63094145 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,6 +1,8 @@ environment: PYPI_PASSWD: secure: HrwOVde4wZoYHJf9bZ5AsQ== + PYTHONIOENCODING: "utf8:backslashreplace" + PYTHONLEGACYWINDOWSSTDIO: "1" matrix: - PYTHON: "C:\\Python35" - PYTHON: "C:\\Python35-x64" @@ -9,6 +11,9 @@ environment: - PYTHON: "C:\\Python37" - PYTHON: "C:\\Python37-x64" +init: + - "chcp 65001" + install: # Ensure the Git Submoduldes have been pulled down too - git submodule update --init --recursive From d1444d015520ce1c60f5670874798a753accd452 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Mon, 15 Apr 2019 13:03:20 +0200 Subject: [PATCH 08/52] Upgrade pip to 19 in CIs --- .appveyor.yml | 2 +- .travis.yml | 2 +- Makefile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 36f63094145..fc20b870743 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -20,7 +20,7 @@ install: - >- tools/build.cmd %PYTHON%\python.exe -m - pip install -U "pip<19" wheel setuptools + pip install -U pip wheel setuptools - "tools/build.cmd %PYTHON%\\python.exe -m pip install -r requirements/cython.txt" - "tools/build.cmd %PYTHON%\\python.exe -m pip install -r requirements/ci.txt" diff --git a/.travis.yml b/.travis.yml index b38cb938ab0..2666be5ea12 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,7 @@ python: - &pypy3 pypy3.5 install: -- &upgrade_python_toolset pip install --upgrade 'pip<19' wheel setuptools +- &upgrade_python_toolset pip install --upgrade pip wheel setuptools - pip install -r requirements/cython.txt - pip install -r requirements/ci.txt diff --git a/Makefile b/Makefile index d7403264ab0..17b299130b2 100644 --- a/Makefile +++ b/Makefile @@ -110,7 +110,7 @@ doc-spelling: @make -C docs spelling SPHINXOPTS="-W -E" install: - @pip install -U 'pip<19' + @pip install -U pip @pip install -Ur requirements/dev.txt .PHONY: all build flake test vtest cov clean doc From 2525fde907e9a4236e4d1e8a3b9839a4cfb86c62 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Mon, 15 Apr 2019 14:13:14 +0200 Subject: [PATCH 09/52] =?UTF-8?q?=F0=9F=94=A5=20Use=20fortunate=5Fpkg=20PE?= =?UTF-8?q?P=20517=20build=20backend?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is required since pip doesn't yet understand the in-tree `backend-path` pyproject.toml option. Ref: https://www.python.org/dev/peps/pep-0517/#in-tree-build-backends --- build-aiohttp/.gitignore | 389 ------------------------ build-aiohttp/.travis.yml | 34 --- build-aiohttp/LICENSE.md | 30 -- build-aiohttp/README.rst | 18 -- build-aiohttp/build_aiohttp/__init__.py | 37 --- build-aiohttp/build_aiohttp/__main__.py | 5 - build-aiohttp/build_aiohttp/api.py | 69 ----- build-aiohttp/setup.cfg | 53 ---- build-aiohttp/setup.py | 7 - pyproject.toml | 19 +- 10 files changed, 13 insertions(+), 648 deletions(-) delete mode 100644 build-aiohttp/.gitignore delete mode 100644 build-aiohttp/.travis.yml delete mode 100644 build-aiohttp/LICENSE.md delete mode 100644 build-aiohttp/README.rst delete mode 100644 build-aiohttp/build_aiohttp/__init__.py delete mode 100644 build-aiohttp/build_aiohttp/__main__.py delete mode 100644 build-aiohttp/build_aiohttp/api.py delete mode 100644 build-aiohttp/setup.cfg delete mode 100644 build-aiohttp/setup.py diff --git a/build-aiohttp/.gitignore b/build-aiohttp/.gitignore deleted file mode 100644 index 1e7ef8f2839..00000000000 --- a/build-aiohttp/.gitignore +++ /dev/null @@ -1,389 +0,0 @@ - -# Created by https://www.gitignore.io/api/git,linux,pydev,python,windows,pycharm+all,jupyternotebook,vim,webstorm,emacs -# Edit at https://www.gitignore.io/?templates=git,linux,pydev,python,windows,pycharm+all,jupyternotebook,vim,webstorm,emacs - -### Emacs ### -# -*- mode: gitignore; -*- -*~ -\#*\# -/.emacs.desktop -/.emacs.desktop.lock -*.elc -auto-save-list -tramp -.\#* - -# Org-mode -.org-id-locations -*_archive - -# flymake-mode -*_flymake.* - -# eshell files -/eshell/history -/eshell/lastdir - -# elpa packages -/elpa/ - -# reftex files -*.rel - -# AUCTeX auto folder -/auto/ - -# cask packages -.cask/ -dist/ - -# Flycheck -flycheck_*.el - -# server auth directory -/server/ - -# projectiles files -.projectile - -# directory configuration -.dir-locals.el - -# network security -/network-security.data - - -### Git ### -# Created by git for backups. To disable backups in Git: -# $ git config --global mergetool.keepBackup false -*.orig - -# Created by git when using merge tools for conflicts -*.BACKUP.* -*.BASE.* -*.LOCAL.* -*.REMOTE.* -*_BACKUP_*.txt -*_BASE_*.txt -*_LOCAL_*.txt -*_REMOTE_*.txt - -### JupyterNotebook ### -.ipynb_checkpoints -*/.ipynb_checkpoints/* - -# Remove previous ipynb_checkpoints -# git rm -r .ipynb_checkpoints/ -# - -### Linux ### - -# temporary files which can be created if a process still has a handle open of a deleted file -.fuse_hidden* - -# KDE directory preferences -.directory - -# Linux trash folder which might appear on any partition or disk -.Trash-* - -# .nfs files are created when an open file is removed but is still being accessed -.nfs* - -### PyCharm+all ### -# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm -# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 - -# User-specific stuff -.idea/**/workspace.xml -.idea/**/tasks.xml -.idea/**/usage.statistics.xml -.idea/**/dictionaries -.idea/**/shelf - -# Generated files -.idea/**/contentModel.xml - -# Sensitive or high-churn files -.idea/**/dataSources/ -.idea/**/dataSources.ids -.idea/**/dataSources.local.xml -.idea/**/sqlDataSources.xml -.idea/**/dynamic.xml -.idea/**/uiDesigner.xml -.idea/**/dbnavigator.xml - -# Gradle -.idea/**/gradle.xml -.idea/**/libraries - -# Gradle and Maven with auto-import -# When using Gradle or Maven with auto-import, you should exclude module files, -# since they will be recreated, and may cause churn. Uncomment if using -# auto-import. -# .idea/modules.xml -# .idea/*.iml -# .idea/modules - -# CMake -cmake-build-*/ - -# Mongo Explorer plugin -.idea/**/mongoSettings.xml - -# File-based project format -*.iws - -# IntelliJ -out/ - -# mpeltonen/sbt-idea plugin -.idea_modules/ - -# JIRA plugin -atlassian-ide-plugin.xml - -# Cursive Clojure plugin -.idea/replstate.xml - -# Crashlytics plugin (for Android Studio and IntelliJ) -com_crashlytics_export_strings.xml -crashlytics.properties -crashlytics-build.properties -fabric.properties - -# Editor-based Rest Client -.idea/httpRequests - -# Android studio 3.1+ serialized cache file -.idea/caches/build_file_checksums.ser - -### PyCharm+all Patch ### -# Ignores the whole .idea folder and all .iml files -# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360 - -.idea/ - -# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023 - -*.iml -modules.xml -.idea/misc.xml -*.ipr - -### pydev ### -.pydevproject - -### Python ### -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -build/ -develop-eggs/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -share/python-wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.nox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -.hypothesis/ -.pytest_cache/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py -db.sqlite3 - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - -# Jupyter Notebook - -# IPython -profile_default/ -ipython_config.py - -# pyenv -.python-version - -# celery beat schedule file -celerybeat-schedule - -# SageMath parsed files -*.sage.py - -# Environments -.env -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ - -### Python Patch ### -.venv/ - -### Vim ### -# Swap -[._]*.s[a-v][a-z] -[._]*.sw[a-p] -[._]s[a-rt-v][a-z] -[._]ss[a-gi-z] -[._]sw[a-p] - -# Session -Session.vim - -# Temporary -.netrwhist -# Auto-generated tag files -tags -# Persistent undo -[._]*.un~ - -### WebStorm ### -# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm -# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 - -# User-specific stuff - -# Generated files - -# Sensitive or high-churn files - -# Gradle - -# Gradle and Maven with auto-import -# When using Gradle or Maven with auto-import, you should exclude module files, -# since they will be recreated, and may cause churn. Uncomment if using -# auto-import. -# .idea/modules.xml -# .idea/*.iml -# .idea/modules - -# CMake - -# Mongo Explorer plugin - -# File-based project format - -# IntelliJ - -# mpeltonen/sbt-idea plugin - -# JIRA plugin - -# Cursive Clojure plugin - -# Crashlytics plugin (for Android Studio and IntelliJ) - -# Editor-based Rest Client - -# Android studio 3.1+ serialized cache file - -### WebStorm Patch ### -# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 - -# *.iml -# modules.xml -# .idea/misc.xml -# *.ipr - -# Sonarlint plugin -.idea/sonarlint - -### Windows ### -# Windows thumbnail cache files -Thumbs.db -ehthumbs.db -ehthumbs_vista.db - -# Dump file -*.stackdump - -# Folder config file -[Dd]esktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msix -*.msm -*.msp - -# Windows shortcuts -*.lnk - -# End of https://www.gitignore.io/api/git,linux,pydev,python,windows,pycharm+all,jupyternotebook,vim,webstorm,emacs diff --git a/build-aiohttp/.travis.yml b/build-aiohttp/.travis.yml deleted file mode 100644 index 2be4a6b14dd..00000000000 --- a/build-aiohttp/.travis.yml +++ /dev/null @@ -1,34 +0,0 @@ -conditions: v1 -dist: xenial -language: python - -python: -- 3.7 - -install: -- skip # TODO: install test dependencies - -script: -- skip # TODO: run pytest - -jobs: - include: - - stage: &stage_deploy_name upload new version of python package to PYPI (only for tagged commits) - if: tag IS present - install: skip - script: skip - deploy: - provider: pypi - on: - all_branches: true - tags: true - user: webknjaz - password: - secure: >- - yXr/zrIul5ejG6HdWPm5Hr71KEaeuSZ1SfvurBkW7psoAEpH6x75tJfym+EZQvGRcEyk/OKGq1Vq2W3eAznVI6ZZ903M2KX7JuNnQ1a88PLKGAwFQVAHCDehL/DWFCypL7IsxHRsaARHm9TXxE2AifEZVi4l2w9u+Yaxra3CpNiR8F93RoaGRtV8XWCSPoZhEgpRB2og5R10IlsK0TvkZmVSDBReYl49WWzLIV4b+PlA483qPiXDyobsbWolQHN2yx8Dao53jYKOwLi9+ZWHbWriB4dijAznIUXksuFJgOlXDinVhVPa+nRo+rPxWzk8Y21s9y/IwlpsWQkvtoca14wx127CxYifPvcS7AhiLcdpWO6N+mrullGZxP0K/Yv/I9JD2FatJVwnWEhKqZg5zD97+z290xOfVHkmgJKyOob9Rz3BMQawi1QgRrl1vxG2xMgaNikBTc6oUkCAajldtCgfTpSaM+Q71ayVwBy5NJuQQldZChzkCWbMeWEWOInUlO+WsMrbJtsAml5QPf6kxf24uu2hUqHghfvHH+TNj/5fN+BkSPKTWeAzdUP8tJVD0SnK/ttJ2BgO9KsSaz1W3n1PM46uzgRe9kAsazLeAC7mArNI+J9E1uMuI16xObFjPlbJ5oF3Ulqkpb93m9PpmhGXY6L8bmO+EkNi4Fhp/BE= - distributions: clean --all sdist bdist_wheel - skip_cleanup: true - skip_upload_docs: true - -cache: - pip: true diff --git a/build-aiohttp/LICENSE.md b/build-aiohttp/LICENSE.md deleted file mode 100644 index d4a4da3729f..00000000000 --- a/build-aiohttp/LICENSE.md +++ /dev/null @@ -1,30 +0,0 @@ -Copyright © 2019, Sviatoslav Sydorenko (wk+open-source@sydorenko.org.ua) - -All rights reserved. - -* * * - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of CherryPy nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/build-aiohttp/README.rst b/build-aiohttp/README.rst deleted file mode 100644 index e7c8fb34f9c..00000000000 --- a/build-aiohttp/README.rst +++ /dev/null @@ -1,18 +0,0 @@ -This is a failure-ignoring installer. - -Status -====== - -Experimental. - -Contribute build_aiohttp -======================== -**Want to add something to upstream?** Feel free to submit a PR or file an issue -if unsure. -Note that PR is more likely to be accepted if it includes tests and detailed -description helping maintainers to understand it better :tada: - -Oh, and be pythonic, please :snake: - -**Don't know how?** Check out `How to Contribute to Open Source -`_ article by GitHub :rocket: diff --git a/build-aiohttp/build_aiohttp/__init__.py b/build-aiohttp/build_aiohttp/__init__.py deleted file mode 100644 index 58d42fb8842..00000000000 --- a/build-aiohttp/build_aiohttp/__init__.py +++ /dev/null @@ -1,37 +0,0 @@ -# -*- coding: utf-8 -*- -"""Fortunate dist installer.""" - -from __future__ import absolute_import, division, print_function -__metadata__ = type - -import subprocess -import sys - - -def maybe_install_pkgs(*pkgs, where=None): - """Try installing a Python dist ignoring failures.""" - if not pkgs: - pkgs = sys.argv[1:] - - if not pkgs: - print(u'😉 Nothing to install, skipping...', file=sys.stderr) - return - - print(u'😄 Installing {0!s}...'.format(', '.join(pkgs)), file=sys.stderr) - - pip_install_prefix = () - if where is not None: - pip_install_prefix = '--prefix', str(where) - - pip_install_cmd = ( - 'pip', 'install', '--ignore-installed', - '--no-warn-script-location', - ) + pip_install_prefix + tuple(pkgs) - - print(u'🛈 Running {0!s}...'.format(pip_install_cmd), file=sys.stderr) - try: - subprocess.call(pip_install_cmd) - except subprocess.CalledProcessError: - print(u'😔 Installation failed, ignoring...', file=sys.stderr) - else: - print(u'😄 Installation succeeded...', file=sys.stderr) diff --git a/build-aiohttp/build_aiohttp/__main__.py b/build-aiohttp/build_aiohttp/__main__.py deleted file mode 100644 index 0d6cc5a0485..00000000000 --- a/build-aiohttp/build_aiohttp/__main__.py +++ /dev/null @@ -1,5 +0,0 @@ -#! /usr/bin/env python -"""A CLI for installing a Python dists if fortune smiles on you.""" - - -__name__ == '__main__' and maybe_install_pkgs() diff --git a/build-aiohttp/build_aiohttp/api.py b/build-aiohttp/build_aiohttp/api.py deleted file mode 100644 index e48cc469449..00000000000 --- a/build-aiohttp/build_aiohttp/api.py +++ /dev/null @@ -1,69 +0,0 @@ -"""PEP 517 build backend pre-installing extra build deps if possible.""" -import functools -import os -import pathlib - -from setuptools.build_meta import ( - build_sdist, - build_wheel, - get_requires_for_build_sdist, - get_requires_for_build_wheel, - prepare_metadata_for_build_wheel, -) -import toml - -from . import maybe_install_pkgs - - -def get_optional_build_deps(): - """Grab optional build dependencies from pyproject.toml config. - - This basically reads entries from: - - [tool.fortunate-pkg.build-system] - optionally-requires = ["optional-dist"] - """ - cwd_path = os.path.realpath(os.getcwd()) - with open(os.path.join(cwd_path, 'pyproject.toml')) as config_file: - pyproject_config = toml.load(config_file) - return ( - pyproject_config['tool']['fortunate-pkg']['build-system']. - get('optionally-requires', []) - ) - - -def get_build_env_location(): - """Identify the current virtualenv path. - - Based on the current file path, find out where it's installed. This - method seems to be more reliable than others. - - Other ways to do this include: - 1) Using ``__file__`` from ``pip`` and ``setuptools`` - 2) Grabbing the value of the ``PYTHONPATH`` environment variable - """ - overlay_venv_path = ( - pathlib.Path(__file__) / '..' / '..' / '..' / '..' / '..' - ).resolve() - return overlay_venv_path - - -def try_having_optional_build_deps(f): - """Try installing optional build deps ignoring the outcome. - - The list is sourced from: - - [tool.fortunate-pkg.build-system] - optionally-requires = ["optional-dist"] - """ - @functools.wraps(f) - def w(*args, **kwargs): - optional_build_deps = get_optional_build_deps() - build_env_location = get_build_env_location() - maybe_install_pkgs(*optional_build_deps, where=build_env_location) - return f(*args, **kwargs) - return w - - -build_sdist = try_having_optional_build_deps(build_sdist) -build_wheel = try_having_optional_build_deps(build_wheel) diff --git a/build-aiohttp/setup.cfg b/build-aiohttp/setup.cfg deleted file mode 100644 index 241865a686c..00000000000 --- a/build-aiohttp/setup.cfg +++ /dev/null @@ -1,53 +0,0 @@ -[bdist_wheel] -universal = 1 - -[metadata] -author = Sviatoslav Sydorenko -author_email = wk+open-source@sydorenko.org.ua -classifiers = - Development Status :: 5 - Production/Stable - Intended Audience :: Developers - Operating System :: OS Independent - License :: OSI Approved :: BSD License - Programming Language :: Python - Programming Language :: Python :: 2 - Programming Language :: Python :: 2.6 - Programming Language :: Python :: 2.7 - Programming Language :: Python :: 3 - Programming Language :: Python :: 3.4 - Programming Language :: Python :: 3.5 - Programming Language :: Python :: 3.6 - Programming Language :: Python :: 3.7 - Programming Language :: Python :: Implementation - Programming Language :: Python :: Implementation :: CPython - Programming Language :: Python :: Implementation :: Jython - Programming Language :: Python :: Implementation :: PyPy -description = Failure-ignoring installer -keywords = - hack - package - installer -license_file = LICENSE.md -long_description = file: README.rst -name = build_aiohttp -project_urls = - GitHub: issues = https://github.com/aio-libs/aiohttp/issues - GitHub: repo = https://github.com/aio-libs/aiohttp -version = 0.0.1 - -[options] -include_package_data = True -install_requires = - pip -packages = find: -python_requires = >=2.6,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.* - -[options.extras_require] -pep517 = - setuptools>=41.0.0 - toml - wheel - -[options.entry_points] -console_scripts = - build_aiohttp = build_aiohttp.__main__:maybe_install_pkgs diff --git a/build-aiohttp/setup.py b/build-aiohttp/setup.py deleted file mode 100644 index eea3d8a6d71..00000000000 --- a/build-aiohttp/setup.py +++ /dev/null @@ -1,7 +0,0 @@ -#! /usr/bin/env python -"""Setup spec for the Python dist.""" - -from setuptools import setup - - -__name__ == '__main__' and setup() diff --git a/pyproject.toml b/pyproject.toml index 9afb4136997..9ba422f6218 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,16 +1,23 @@ [build-system] -#requires = ["../fortunate_pkg"] -#requires = ["fortunate-pkg", "setuptools>=40.2", "wheel"] -requires = ["./build-aiohttp[pep517]"] +# NOTE: Pip will install these dependencies into an isolated venv +requires = ["fortunate-pkg[pep517] == 0.2.0"] -#build-backend = "setuptools.build_meta" -build-backend = "build_aiohttp.api" +# NOTE: Modern setuptools implements a PEP 517 backend available at: +# build-backend = "setuptools.build_meta" +# NOTE: But we going to use a custom one since our requirements are +# NOTE: too project-specific. +build-backend = "fortunate_pkg.pep517_backend" # NOTE: in-tree backend path usage is not yet implemented in pip # Ref: https://www.python.org/dev/peps/pep-0517/#in-tree-build-backends -backend-path = "./build-aiohttp" +# NOTE: future config could look like this: +# backend-path = "./build-aiohttp" [tool.fortunate-pkg.build-system] +# NOTE: These distribution will be `pip install`ed but failure to +# NOTE: complete this will be ignored. This will ensure that Cython is +# NOTE: available in the build venv if the external environments +# NOTE: allow it. optionally-requires = ["Cython"] [tool.towncrier] From 996ff9000b86e64d8c6357b078ff3a7809415bf1 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Mon, 15 Apr 2019 14:24:50 +0200 Subject: [PATCH 10/52] =?UTF-8?q?=F0=9F=8E=A8=20Single-source=20cython=20b?= =?UTF-8?q?uild=20dependency?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .appveyor.yml | 1 - .travis.yml | 5 ----- Makefile | 1 - pyproject.toml | 2 +- requirements/ci-wheel.txt | 1 - requirements/cython.txt | 1 - requirements/wheel.txt | 1 - tools/build-wheels.sh | 2 -- 8 files changed, 1 insertion(+), 13 deletions(-) delete mode 100644 requirements/cython.txt diff --git a/.appveyor.yml b/.appveyor.yml index fc20b870743..c489c28a7a3 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -21,7 +21,6 @@ install: - >- tools/build.cmd %PYTHON%\python.exe -m pip install -U pip wheel setuptools - - "tools/build.cmd %PYTHON%\\python.exe -m pip install -r requirements/cython.txt" - "tools/build.cmd %PYTHON%\\python.exe -m pip install -r requirements/ci.txt" build_script: diff --git a/.travis.yml b/.travis.yml index 2666be5ea12..ee8caeb85e4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,6 @@ python: install: - &upgrade_python_toolset pip install --upgrade pip wheel setuptools -- pip install -r requirements/cython.txt - pip install -r requirements/ci.txt script: @@ -155,7 +154,6 @@ jobs: name: Checking Towncrier fragments install: - *upgrade_python_toolset - - pip install -r requirements/cython.txt - pip install -r requirements/ci.txt - pip install -r requirements/towncrier.txt script: @@ -173,7 +171,6 @@ jobs: name: Linting source code with mypy install: - *upgrade_python_toolset - - pip install -r requirements/cython.txt - pip install -r requirements/ci.txt script: - mypy aiohttp @@ -182,7 +179,6 @@ jobs: name: Verifying distribution package metadata install: - *upgrade_python_toolset - - pip install -r requirements/cython.txt - pip install -r requirements/ci.txt -r requirements/doc.txt script: - python setup.py check --metadata --restructuredtext --strict --verbose sdist bdist_wheel @@ -230,7 +226,6 @@ jobs: - docker script: - ./tools/run_docker.sh "aiohttp" - - pip install -r requirements/cython.txt - pip install -r requirements/ci.txt # to compile *.c files by Cython deploy: <<: *deploy_step diff --git a/Makefile b/Makefile index 17b299130b2..173327e0f74 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,6 @@ all: test .install-deps: $(shell find requirements -type f) - pip install -r requirements/cython.txt pip install -r requirements/dev.txt @touch .install-deps diff --git a/pyproject.toml b/pyproject.toml index 9ba422f6218..431100e0afd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,7 @@ build-backend = "fortunate_pkg.pep517_backend" # NOTE: complete this will be ignored. This will ensure that Cython is # NOTE: available in the build venv if the external environments # NOTE: allow it. -optionally-requires = ["Cython"] +optionally-requires = ["Cython == 0.29.6"] [tool.towncrier] package = "aiohttp" diff --git a/requirements/ci-wheel.txt b/requirements/ci-wheel.txt index 8cb5885f782..1d47f01eedc 100644 --- a/requirements/ci-wheel.txt +++ b/requirements/ci-wheel.txt @@ -6,7 +6,6 @@ brotlipy==0.7.0 cchardet==2.1.4 chardet==3.0.4 coverage==4.5.2 -cython==0.29.6 gunicorn==19.9.0 multidict==4.5.2 pytest==4.3.0 diff --git a/requirements/cython.txt b/requirements/cython.txt deleted file mode 100644 index 14d8b897d95..00000000000 --- a/requirements/cython.txt +++ /dev/null @@ -1 +0,0 @@ -cython==0.29.6 diff --git a/requirements/wheel.txt b/requirements/wheel.txt index deab1e891b4..156e167cb32 100644 --- a/requirements/wheel.txt +++ b/requirements/wheel.txt @@ -1,3 +1,2 @@ -cython==0.29.6 pytest==4.3.0 twine==1.13.0 diff --git a/tools/build-wheels.sh b/tools/build-wheels.sh index e5d744b2a86..87df7c0c6b1 100755 --- a/tools/build-wheels.sh +++ b/tools/build-wheels.sh @@ -31,7 +31,6 @@ echo echo echo "Compile wheels" for PYTHON in ${PYTHON_VERSIONS}; do - /opt/python/${PYTHON}/bin/pip install -r "${WORKDIR_PATH}/requirements/cython.txt" /opt/python/${PYTHON}/bin/pip install -r "${WORKDIR_PATH}/requirements/wheel.txt" /opt/python/${PYTHON}/bin/pip wheel "${WORKDIR_PATH}/" -w "${WORKDIR_PATH}/dist/" done @@ -67,7 +66,6 @@ for PYTHON in ${PYTHON_VERSIONS}; do echo echo -n "Test $PYTHON: " /opt/python/${PYTHON}/bin/python -c "import platform; print('Building wheel for {platform} platform.'.format(platform=platform.platform()))" - /opt/python/${PYTHON}/bin/pip install -r ${WORKDIR_PATH}/requirements/cython.txt /opt/python/${PYTHON}/bin/pip install -r ${WORKDIR_PATH}/requirements/ci-wheel.txt /opt/python/${PYTHON}/bin/pip install "$package_name" --no-index -f "file://${WORKDIR_PATH}/dist" /opt/python/${PYTHON}/bin/py.test ${WORKDIR_PATH}/tests From bdeb1c0495949a9286ee19fc52ff49ea24a61f35 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Mon, 15 Apr 2019 14:43:11 +0200 Subject: [PATCH 11/52] Don't build dist when checking it --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ee8caeb85e4..9245e870718 100644 --- a/.travis.yml +++ b/.travis.yml @@ -181,7 +181,7 @@ jobs: - *upgrade_python_toolset - pip install -r requirements/ci.txt -r requirements/doc.txt script: - - python setup.py check --metadata --restructuredtext --strict --verbose sdist bdist_wheel + - python -m setup check --metadata --restructuredtext --strict --verbose - twine check dist/* - <<: *_lint_base From 70bf0b08ea01f4e0ab00b700a98705ec2f94737a Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Mon, 15 Apr 2019 15:08:01 +0200 Subject: [PATCH 12/52] =?UTF-8?q?=F0=9F=9A=91=20Build=20dists=20for=20the?= =?UTF-8?q?=20metadata=20check=20in=20Travis=20CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9245e870718..3973c22fd0d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -179,7 +179,8 @@ jobs: name: Verifying distribution package metadata install: - *upgrade_python_toolset - - pip install -r requirements/ci.txt -r requirements/doc.txt + - pip install pep517 -r requirements/ci.txt -r requirements/doc.txt + - python -m pep517.build --source --binary --out-dir ./dist/ . script: - python -m setup check --metadata --restructuredtext --strict --verbose - twine check dist/* From 4ec90d2b5e3a5e290b6b68ce6bb41955111ddf93 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Mon, 15 Apr 2019 15:10:53 +0200 Subject: [PATCH 13/52] =?UTF-8?q?=F0=9F=90=9B=20Build=20dists=20in=20AppVe?= =?UTF-8?q?yor=20via=20PEP=20517?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .appveyor.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index c489c28a7a3..33b796a4584 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -24,7 +24,8 @@ install: - "tools/build.cmd %PYTHON%\\python.exe -m pip install -r requirements/ci.txt" build_script: - - "tools/build.cmd %PYTHON%\\python.exe -m setup sdist bdist_wheel" + - "tools/build.cmd %PYTHON%\\python.exe -m pip install pep517" + - "tools/build.cmd %PYTHON%\\python.exe -m pep517.build --source --binary --out-dir ./dist/ ." test_script: - "tools/build.cmd %PYTHON%\\python.exe -m pytest -c pytest.ci.ini --cov-report xml" From 16f01118a59493746d5a1810d19b86e0e06cfa4c Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Mon, 15 Apr 2019 22:07:12 +0200 Subject: [PATCH 14/52] Don't use editable install in tests --- requirements/ci.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/ci.txt b/requirements/ci.txt index fd10a86f8b7..e76ff223432 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -4,4 +4,4 @@ mypy-extensions==0.4.1; implementation_name=="cpython" -r ci-wheel.txt -r doc.txt --e . +. From b111fc4d87b65e98f42434e79dbe7e3984895c08 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Mon, 15 Apr 2019 23:29:53 +0200 Subject: [PATCH 15/52] Print out debug paths in AppVeyor --- setup.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/setup.py b/setup.py index 089ff56e96e..df8b66fc589 100644 --- a/setup.py +++ b/setup.py @@ -8,6 +8,14 @@ from setuptools import Extension, setup +# DEBUG on +import os +import setuptools +print(os.getenv('PYTHONPATH')) +print(setuptools.__file__) +print(__file__) +# DEBUG off + if sys.version_info < (3, 5, 3): raise RuntimeError("aiohttp 3.x requires Python 3.5.3+") From d6ed8ede9f725c01a1bf4baca8531293e8d0d6f5 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Tue, 16 Apr 2019 00:44:34 +0200 Subject: [PATCH 16/52] Print setup args --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index df8b66fc589..201856b5798 100644 --- a/setup.py +++ b/setup.py @@ -14,6 +14,7 @@ print(os.getenv('PYTHONPATH')) print(setuptools.__file__) print(__file__) +print(sys.argv) # DEBUG off From c4e07e8e535665d71c7669f31f692ece98b6070c Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Tue, 16 Apr 2019 00:52:41 +0200 Subject: [PATCH 17/52] print site-packages --- setup.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup.py b/setup.py index 201856b5798..af220bf9441 100644 --- a/setup.py +++ b/setup.py @@ -10,11 +10,13 @@ # DEBUG on import os +import pathlib import setuptools print(os.getenv('PYTHONPATH')) print(setuptools.__file__) print(__file__) print(sys.argv) +print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'overlay' / 'Lib' / 'site-packages').iterdir())) # DEBUG off From d574607f87b4d9974d8e056f2d04e365c06830fc Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Tue, 16 Apr 2019 00:59:19 +0200 Subject: [PATCH 18/52] Bump fortunate-pkg to v0.2.1 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 431100e0afd..4b9206e1560 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] # NOTE: Pip will install these dependencies into an isolated venv -requires = ["fortunate-pkg[pep517] == 0.2.0"] +requires = ["fortunate-pkg[pep517] == 0.2.1"] # NOTE: Modern setuptools implements a PEP 517 backend available at: # build-backend = "setuptools.build_meta" From d7938f633a9171995e87e5a8e92e2c21e10a7eb7 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Tue, 16 Apr 2019 01:07:14 +0200 Subject: [PATCH 19/52] print level up --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index af220bf9441..6e19b29851b 100644 --- a/setup.py +++ b/setup.py @@ -17,6 +17,7 @@ print(__file__) print(sys.argv) print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'overlay' / 'Lib' / 'site-packages').iterdir())) +print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..').iterdir())) # DEBUG off From 5fe05620e27ad1c62faa6402b1411f06a6c24d33 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Tue, 16 Apr 2019 01:11:41 +0200 Subject: [PATCH 20/52] Shuffle stuff --- setup.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 6e19b29851b..c2a1ec67dcf 100644 --- a/setup.py +++ b/setup.py @@ -16,8 +16,11 @@ print(setuptools.__file__) print(__file__) print(sys.argv) -print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'overlay' / 'Lib' / 'site-packages').iterdir())) print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..').iterdir())) +if sys.platform == 'linux': + print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'overlay' / 'lib' / 'site-packages').iterdir())) +else: + print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'overlay' / 'Lib' / 'site-packages').iterdir())) # DEBUG off From d793cf1a393c78198427785dda5397f342333a4c Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Tue, 16 Apr 2019 01:15:25 +0200 Subject: [PATCH 21/52] inject py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index c2a1ec67dcf..d11091d64b5 100644 --- a/setup.py +++ b/setup.py @@ -18,7 +18,7 @@ print(sys.argv) print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..').iterdir())) if sys.platform == 'linux': - print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'overlay' / 'lib' / 'site-packages').iterdir())) + print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'overlay' / 'python3.7.1' / 'lib' / 'site-packages').iterdir())) else: print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'overlay' / 'Lib' / 'site-packages').iterdir())) # DEBUG off From f70ca50b2d7dd8bdec53ef81eec7fbf24099659c Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Tue, 16 Apr 2019 01:18:11 +0200 Subject: [PATCH 22/52] Just 3.7 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index d11091d64b5..59e079555e3 100644 --- a/setup.py +++ b/setup.py @@ -18,7 +18,7 @@ print(sys.argv) print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..').iterdir())) if sys.platform == 'linux': - print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'overlay' / 'python3.7.1' / 'lib' / 'site-packages').iterdir())) + print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'overlay' / 'python3.7' / 'lib' / 'site-packages').iterdir())) else: print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'overlay' / 'Lib' / 'site-packages').iterdir())) # DEBUG off From c93b8d3de349985301ed3cc25b3a10c52fad0cf2 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Tue, 16 Apr 2019 01:20:26 +0200 Subject: [PATCH 23/52] print overlay --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 59e079555e3..5ee8172bfee 100644 --- a/setup.py +++ b/setup.py @@ -17,6 +17,7 @@ print(__file__) print(sys.argv) print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..').iterdir())) +print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'overlay').iterdir())) if sys.platform == 'linux': print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'overlay' / 'python3.7' / 'lib' / 'site-packages').iterdir())) else: From 8964af046fe61e253a36734fe63b9cdc31308372 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Tue, 16 Apr 2019 01:23:40 +0200 Subject: [PATCH 24/52] lib --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 5ee8172bfee..04f1fce9ae5 100644 --- a/setup.py +++ b/setup.py @@ -18,8 +18,9 @@ print(sys.argv) print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..').iterdir())) print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'overlay').iterdir())) +print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'overlay' / 'lib').iterdir())) if sys.platform == 'linux': - print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'overlay' / 'python3.7' / 'lib' / 'site-packages').iterdir())) + print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'overlay' / 'lib' / 'site-packages').iterdir())) else: print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'overlay' / 'Lib' / 'site-packages').iterdir())) # DEBUG off From e6f69ed9b5c17dcd6ccf4b6333ced8e603cd778a Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Tue, 16 Apr 2019 01:26:49 +0200 Subject: [PATCH 25/52] python3.7 --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 04f1fce9ae5..c0ad6ee039a 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,8 @@ print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'overlay').iterdir())) print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'overlay' / 'lib').iterdir())) if sys.platform == 'linux': - print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'overlay' / 'lib' / 'site-packages').iterdir())) + print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'overlay' / 'lib' / 'python3.7').iterdir())) + print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'overlay' / 'lib' / 'python3.7' / 'site-packages').iterdir())) else: print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'overlay' / 'Lib' / 'site-packages').iterdir())) # DEBUG off From cd299daa7773131aa00c54fd261b95d194ec228f Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Tue, 16 Apr 2019 01:30:06 +0200 Subject: [PATCH 26/52] RuntimeError --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index c0ad6ee039a..26a2d5da5fc 100644 --- a/setup.py +++ b/setup.py @@ -24,6 +24,7 @@ print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'overlay' / 'lib' / 'python3.7' / 'site-packages').iterdir())) else: print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'overlay' / 'Lib' / 'site-packages').iterdir())) +raise RuntimeError # DEBUG off From 6a4e5fbe8de9cf9bd50be07e0545fa0b60b8eaa5 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Tue, 16 Apr 2019 01:38:23 +0200 Subject: [PATCH 27/52] Unruntime err --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 26a2d5da5fc..c119a8f1c88 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'overlay' / 'lib' / 'python3.7' / 'site-packages').iterdir())) else: print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'overlay' / 'Lib' / 'site-packages').iterdir())) -raise RuntimeError +#raise RuntimeError # DEBUG off From 0318f122b6a7af068dc3f908cf1acda5ebf71b04 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Tue, 16 Apr 2019 01:39:07 +0200 Subject: [PATCH 28/52] Bump fortunate-pkg to v0.2.2 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4b9206e1560..12820bbf220 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] # NOTE: Pip will install these dependencies into an isolated venv -requires = ["fortunate-pkg[pep517] == 0.2.1"] +requires = ["fortunate-pkg[pep517] == 0.2.2"] # NOTE: Modern setuptools implements a PEP 517 backend available at: # build-backend = "setuptools.build_meta" From 6fae4132efc44c093ff3870fd3487601b3d43b31 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Tue, 16 Apr 2019 01:49:47 +0200 Subject: [PATCH 29/52] Hide some prints --- setup.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index c119a8f1c88..ce96d95f69e 100644 --- a/setup.py +++ b/setup.py @@ -17,13 +17,13 @@ print(__file__) print(sys.argv) print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..').iterdir())) -print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'overlay').iterdir())) -print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'overlay' / 'lib').iterdir())) +#print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'overlay').iterdir())) +#print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'overlay' / 'lib').iterdir())) if sys.platform == 'linux': - print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'overlay' / 'lib' / 'python3.7').iterdir())) - print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'overlay' / 'lib' / 'python3.7' / 'site-packages').iterdir())) + print(list((pathlib.Path(setuptools.__file__) / '..').resolve().iterdir())) + #print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'overlay' / 'lib' / 'python3.7' / 'site-packages').iterdir())) else: - print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'overlay' / 'Lib' / 'site-packages').iterdir())) + print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'Lib' / 'site-packages').iterdir())) #raise RuntimeError # DEBUG off From 549adeb4a216f9368259d0698bf8e390743e1b1d Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Tue, 16 Apr 2019 01:50:43 +0200 Subject: [PATCH 30/52] generic --- setup.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index ce96d95f69e..19b1d17c75d 100644 --- a/setup.py +++ b/setup.py @@ -19,11 +19,12 @@ print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..').iterdir())) #print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'overlay').iterdir())) #print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'overlay' / 'lib').iterdir())) -if sys.platform == 'linux': - print(list((pathlib.Path(setuptools.__file__) / '..').resolve().iterdir())) - #print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'overlay' / 'lib' / 'python3.7' / 'site-packages').iterdir())) -else: - print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'Lib' / 'site-packages').iterdir())) +print(list((pathlib.Path(setuptools.__file__) / '..').resolve().iterdir())) +print(list((pathlib.Path(setuptools.__file__) / '..' / '..').resolve().iterdir())) +#if sys.platform == 'linux': +# #print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'overlay' / 'lib' / 'python3.7' / 'site-packages').iterdir())) +#else: +# print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'Lib' / 'site-packages').iterdir())) #raise RuntimeError # DEBUG off From 48f56b666b266e1a5c5b201c324dd572c5840fb5 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Tue, 16 Apr 2019 01:55:31 +0200 Subject: [PATCH 31/52] =?UTF-8?q?=F0=9F=94=A5=20Drop=20debug=20output=20fr?= =?UTF-8?q?om=20setup.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.py | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/setup.py b/setup.py index 19b1d17c75d..089ff56e96e 100644 --- a/setup.py +++ b/setup.py @@ -8,26 +8,6 @@ from setuptools import Extension, setup -# DEBUG on -import os -import pathlib -import setuptools -print(os.getenv('PYTHONPATH')) -print(setuptools.__file__) -print(__file__) -print(sys.argv) -print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..').iterdir())) -#print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'overlay').iterdir())) -#print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'overlay' / 'lib').iterdir())) -print(list((pathlib.Path(setuptools.__file__) / '..').resolve().iterdir())) -print(list((pathlib.Path(setuptools.__file__) / '..' / '..').resolve().iterdir())) -#if sys.platform == 'linux': -# #print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'overlay' / 'lib' / 'python3.7' / 'site-packages').iterdir())) -#else: -# print(list((pathlib.Path(os.getenv('PYTHONPATH')) / '..' / 'Lib' / 'site-packages').iterdir())) -#raise RuntimeError -# DEBUG off - if sys.version_info < (3, 5, 3): raise RuntimeError("aiohttp 3.x requires Python 3.5.3+") From 482c826ac7961fcbc3694f2c5d36c63e34dcd3a4 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Tue, 16 Apr 2019 01:56:12 +0200 Subject: [PATCH 32/52] Bump fortunate-pkg to v0.2.3 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 12820bbf220..51b8d034dc0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] # NOTE: Pip will install these dependencies into an isolated venv -requires = ["fortunate-pkg[pep517] == 0.2.2"] +requires = ["fortunate-pkg[pep517] == 0.2.3"] # NOTE: Modern setuptools implements a PEP 517 backend available at: # build-backend = "setuptools.build_meta" From 41dc716821c190a0ba739eca13fa9955fa4c3c84 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Wed, 17 Apr 2019 02:47:21 +0200 Subject: [PATCH 33/52] Bump PyPy 3.6 to v6.0.0 --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3973c22fd0d..bc7a11d3f3e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ python: - 3.6 - &mainstream_python 3.7 - nightly -- &pypy3 pypy3.5 +- &pypy3 pypy3.6-6.0.0 install: - &upgrade_python_toolset pip install --upgrade pip wheel setuptools @@ -57,7 +57,7 @@ _helpers: language: generic python: *pypy3 env: - - &env_pypy3 PYTHON_VERSION=pypy3.5-5.10.0 + - &env_pypy3 PYTHON_VERSION=pypy3.6-6.0.0 - &env_pyenv PYENV_ROOT="$HOME/.pyenv" - &env_path PATH="$PYENV_ROOT/bin:$PATH" before_install: From c8af0ac36d37488c92bd41b2ab186868cbd25777 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Wed, 17 Apr 2019 17:40:00 +0200 Subject: [PATCH 34/52] Adjust PyPy versions --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index bc7a11d3f3e..68d85410855 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ python: - 3.6 - &mainstream_python 3.7 - nightly -- &pypy3 pypy3.6-6.0.0 +- &pypy3 pypy3.5-6.0.0 install: - &upgrade_python_toolset pip install --upgrade pip wheel setuptools @@ -57,7 +57,7 @@ _helpers: language: generic python: *pypy3 env: - - &env_pypy3 PYTHON_VERSION=pypy3.6-6.0.0 + - &env_pypy3 PYTHON_VERSION=pypy3.6-7.1.1 - &env_pyenv PYENV_ROOT="$HOME/.pyenv" - &env_path PATH="$PYENV_ROOT/bin:$PATH" before_install: From 884b30d3debde45be79ba2a83f6ebaa55e754bf1 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Thu, 18 Apr 2019 09:51:53 +0200 Subject: [PATCH 35/52] =?UTF-8?q?=E2=87=A7=20Bump=20fortunate=5Fpkg=20to?= =?UTF-8?q?=20v0.2.4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 51b8d034dc0..e00e14e8b46 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] # NOTE: Pip will install these dependencies into an isolated venv -requires = ["fortunate-pkg[pep517] == 0.2.3"] +requires = ["fortunate-pkg[pep517] == 0.2.4"] # NOTE: Modern setuptools implements a PEP 517 backend available at: # build-backend = "setuptools.build_meta" From c5f73786faba150fb8ce1437533f1ea440069e12 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Thu, 18 Apr 2019 11:35:47 +0200 Subject: [PATCH 36/52] Bump fortunate_pkg to v0.2.6 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e00e14e8b46..c8482d3dd33 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] # NOTE: Pip will install these dependencies into an isolated venv -requires = ["fortunate-pkg[pep517] == 0.2.4"] +requires = ["fortunate-pkg[pep517] == 0.2.6"] # NOTE: Modern setuptools implements a PEP 517 backend available at: # build-backend = "setuptools.build_meta" From ae053bc66f11366f80c62da2531ab4481053958e Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Thu, 18 Apr 2019 22:42:14 +0200 Subject: [PATCH 37/52] Enable RDP in the AppVeyor CI --- .appveyor.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.appveyor.yml b/.appveyor.yml index 33b796a4584..efde1113a85 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -13,6 +13,8 @@ environment: init: - "chcp 65001" + - ps: >- + iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) install: # Ensure the Git Submoduldes have been pulled down too From af11b61d5eff654f6a698737ac2ac1f280e7045b Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Fri, 19 Apr 2019 00:30:03 +0200 Subject: [PATCH 38/52] Keep RDP session on finish --- .appveyor.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.appveyor.yml b/.appveyor.yml index efde1113a85..1fb5f815653 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -44,6 +44,10 @@ deploy_script: Invoke-Expression "$env:PYTHON\\python.exe -m twine upload dist/* --username aio-libs-bot --password $env:PYPI_PASSWD --skip-existing" } +on_finish: + - ps: >- + $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) + #notifications: # - provider: Webhook # url: https://ci.appveyor.com/api/github/webhook?id=08c7793w1tp839fl From 9a1fff4380d12da612175f93d86c730fd4552c30 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Fri, 19 Apr 2019 11:50:55 +0200 Subject: [PATCH 39/52] Remove aiohttp package in AppVeyor --- .appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.appveyor.yml b/.appveyor.yml index 1fb5f815653..d6d5a5355e8 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -24,6 +24,7 @@ install: tools/build.cmd %PYTHON%\python.exe -m pip install -U pip wheel setuptools - "tools/build.cmd %PYTHON%\\python.exe -m pip install -r requirements/ci.txt" + - rm -rf aiohttp build_script: - "tools/build.cmd %PYTHON%\\python.exe -m pip install pep517" From d0fd36490eea322500fe0732779800cca1170511 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Fri, 19 Apr 2019 14:01:49 +0200 Subject: [PATCH 40/52] Revert "Remove aiohttp package in AppVeyor" This reverts commit 9a1fff4380d12da612175f93d86c730fd4552c30. --- .appveyor.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index d6d5a5355e8..1fb5f815653 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -24,7 +24,6 @@ install: tools/build.cmd %PYTHON%\python.exe -m pip install -U pip wheel setuptools - "tools/build.cmd %PYTHON%\\python.exe -m pip install -r requirements/ci.txt" - - rm -rf aiohttp build_script: - "tools/build.cmd %PYTHON%\\python.exe -m pip install pep517" From 0cd95eab532ec4f580eb747b255b749f2e53a644 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Fri, 19 Apr 2019 14:03:49 +0200 Subject: [PATCH 41/52] Use --no-build-isolation in AppVeyor --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 1fb5f815653..3ab66730701 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -23,7 +23,7 @@ install: - >- tools/build.cmd %PYTHON%\python.exe -m pip install -U pip wheel setuptools - - "tools/build.cmd %PYTHON%\\python.exe -m pip install -r requirements/ci.txt" + - "tools/build.cmd %PYTHON%\\python.exe -m pip install --no-build-isolation -r requirements/ci.txt" build_script: - "tools/build.cmd %PYTHON%\\python.exe -m pip install pep517" From 9e68d35feba1dc2efc48f85fea27420f60c49235 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Fri, 19 Apr 2019 14:09:57 +0200 Subject: [PATCH 42/52] Install fortunate_pkg[pep517] in AppVeyor directly --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 3ab66730701..9c43400dc6d 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -22,7 +22,7 @@ install: - >- tools/build.cmd %PYTHON%\python.exe -m - pip install -U pip wheel setuptools + pip install -U pip wheel setuptools fortunate_pkg[pep517] - "tools/build.cmd %PYTHON%\\python.exe -m pip install --no-build-isolation -r requirements/ci.txt" build_script: From 89972854e8839b5a1f4d0a369707a8e29e60f1d2 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Fri, 19 Apr 2019 15:41:38 +0200 Subject: [PATCH 43/52] Temporary mv aiohttp out of the way of pytest --- .appveyor.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 9c43400dc6d..2b6480886cd 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -22,15 +22,17 @@ install: - >- tools/build.cmd %PYTHON%\python.exe -m - pip install -U pip wheel setuptools fortunate_pkg[pep517] - - "tools/build.cmd %PYTHON%\\python.exe -m pip install --no-build-isolation -r requirements/ci.txt" + pip install -U pip wheel setuptools + - "tools/build.cmd %PYTHON%\\python.exe -m pip install -r requirements/ci.txt" build_script: - "tools/build.cmd %PYTHON%\\python.exe -m pip install pep517" - "tools/build.cmd %PYTHON%\\python.exe -m pep517.build --source --binary --out-dir ./dist/ ." test_script: + - mv aiohttp aiohttp.bak - "tools/build.cmd %PYTHON%\\python.exe -m pytest -c pytest.ci.ini --cov-report xml" + - mv aiohttp.bak aiohttp after_test: - "tools/build.cmd %PYTHON%\\python.exe -m codecov -f coverage.xml -X gcov" From ee656b22d8a2eb5167a176205d6cfd7e0a97ff1e Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Fri, 19 Apr 2019 15:55:50 +0200 Subject: [PATCH 44/52] Add toggle for RDP --- .appveyor.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 2b6480886cd..39a88c998d5 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -14,7 +14,9 @@ environment: init: - "chcp 65001" - ps: >- - iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) + if($env:appveyor_repo_tag -eq 'True') { + iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) + } install: # Ensure the Git Submoduldes have been pulled down too @@ -48,7 +50,10 @@ deploy_script: on_finish: - ps: >- - $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) + if($env:appveyor_repo_tag -eq 'True') { + $blockRdp = $true + iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) + } #notifications: # - provider: Webhook From a959c8a8fe8189f6d9e93fe920d3892c7d6f2a84 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Fri, 19 Apr 2019 15:58:47 +0200 Subject: [PATCH 45/52] Rename RDP debug var --- .appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 39a88c998d5..73256c0fd35 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -14,7 +14,7 @@ environment: init: - "chcp 65001" - ps: >- - if($env:appveyor_repo_tag -eq 'True') { + if($env:APPVEYOR_RDP_DEBUG -eq 'True') { iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) } @@ -50,7 +50,7 @@ deploy_script: on_finish: - ps: >- - if($env:appveyor_repo_tag -eq 'True') { + if($env:APPVEYOR_RDP_DEBUG -eq 'True') { $blockRdp = $true iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) } From 05f334404d4e06275b3bef329f38363a9ff482e0 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Fri, 19 Apr 2019 16:02:03 +0200 Subject: [PATCH 46/52] Inline iex --- .appveyor.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 73256c0fd35..8a3bf4e0b17 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -51,8 +51,7 @@ deploy_script: on_finish: - ps: >- if($env:APPVEYOR_RDP_DEBUG -eq 'True') { - $blockRdp = $true - iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) + $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) } #notifications: From a003d0f0cbd2f6dff6c7c42bdc1ab6b93cc4ae20 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Fri, 19 Apr 2019 16:04:44 +0200 Subject: [PATCH 47/52] Drop iex clause --- .appveyor.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 8a3bf4e0b17..6d3313bd3d6 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -13,10 +13,10 @@ environment: init: - "chcp 65001" + #if($env:APPVEYOR_RDP_DEBUG -eq 'True') { + #} - ps: >- - if($env:APPVEYOR_RDP_DEBUG -eq 'True') { - iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) - } + iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) install: # Ensure the Git Submoduldes have been pulled down too @@ -49,10 +49,10 @@ deploy_script: } on_finish: + #if($env:APPVEYOR_RDP_DEBUG -eq 'True') { + #} - ps: >- - if($env:APPVEYOR_RDP_DEBUG -eq 'True') { - $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) - } + $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) #notifications: # - provider: Webhook From 5d39cdd504e8c885fe4fed824ccfd5cd6c486c2f Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Fri, 19 Apr 2019 16:11:27 +0200 Subject: [PATCH 48/52] Revert "Drop iex clause" This reverts commit a003d0f0cbd2f6dff6c7c42bdc1ab6b93cc4ae20. --- .appveyor.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 6d3313bd3d6..8a3bf4e0b17 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -13,10 +13,10 @@ environment: init: - "chcp 65001" - #if($env:APPVEYOR_RDP_DEBUG -eq 'True') { - #} - ps: >- - iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) + if($env:APPVEYOR_RDP_DEBUG -eq 'True') { + iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) + } install: # Ensure the Git Submoduldes have been pulled down too @@ -49,10 +49,10 @@ deploy_script: } on_finish: - #if($env:APPVEYOR_RDP_DEBUG -eq 'True') { - #} - ps: >- - $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) + if($env:APPVEYOR_RDP_DEBUG -eq 'True') { + $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) + } #notifications: # - provider: Webhook From e81c091836f6fdbec38c768727c951f66a5a9ebc Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Fri, 19 Apr 2019 16:14:49 +0200 Subject: [PATCH 49/52] Revert "Inline iex" This reverts commit 05f334404d4e06275b3bef329f38363a9ff482e0. --- .appveyor.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 8a3bf4e0b17..73256c0fd35 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -51,7 +51,8 @@ deploy_script: on_finish: - ps: >- if($env:APPVEYOR_RDP_DEBUG -eq 'True') { - $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) + $blockRdp = $true + iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) } #notifications: From 24864995ed3210e826b652132f4ff13a0df744b2 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sat, 20 Apr 2019 21:27:35 +0200 Subject: [PATCH 50/52] Ignore pip-wheel-metadata --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index d5e6cf1331c..7a0d8d5a7ef 100644 --- a/.gitignore +++ b/.gitignore @@ -56,4 +56,5 @@ virtualenv.py .python-version .pytest_cache .vscode -.mypy_cache \ No newline at end of file +.mypy_cache +pip-wheel-metadata/ From 878cea3086d2315bbcfdd931a207c236b92b37f1 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sat, 20 Apr 2019 23:17:23 +0200 Subject: [PATCH 51/52] Add build deps to Makefile --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 173327e0f74..d228085ecd5 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ all: test .install-deps: $(shell find requirements -type f) + pip install fortunate_pkg[pep517] cython pip install -r requirements/dev.txt @touch .install-deps From 481d8c7ebe5177228ecda365991c43f7c30e978b Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Tue, 23 Apr 2019 21:47:11 +0200 Subject: [PATCH 52/52] Bump fortunate-pkg to v0.2.7 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c8482d3dd33..f90b77a10f6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] # NOTE: Pip will install these dependencies into an isolated venv -requires = ["fortunate-pkg[pep517] == 0.2.6"] +requires = ["fortunate-pkg[pep517] == 0.2.7"] # NOTE: Modern setuptools implements a PEP 517 backend available at: # build-backend = "setuptools.build_meta"