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

build wheel only once per tox invocation #180

Merged
merged 3 commits into from
Sep 24, 2020

Conversation

graingert
Copy link
Member

@graingert graingert commented Sep 23, 2020

Currently a whl is built for each TOX_ENV, with this PR the whl will be created once before all other TOX_ENVs and reused

Contributor Checklist:

  • I have updated the release notes at docs/source/NEWS.rst
  • I have updated the automated tests.
  • All tests pass on your local dev environment. See CONTRIBUTING.rst.

@codecov
Copy link

codecov bot commented Sep 23, 2020

Codecov Report

Merging #180 into master will increase coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #180   +/-   ##
=======================================
  Coverage   93.63%   93.63%           
=======================================
  Files          74       74           
  Lines       10417    10420    +3     
  Branches     1071     1071           
=======================================
+ Hits         9754     9757    +3     
  Misses        544      544           
  Partials      119      119           
Impacted Files Coverage Δ
ldaptor/test/test_ldiftree.py 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fb045e9...ddf283a. Read the comment docs.

@graingert graingert force-pushed the build-wheel-only-once branch 2 times, most recently from a90cbcc to ce0abbb Compare September 23, 2020 19:03
@graingert graingert changed the title build wheel only once build wheel only once per tox invocation Sep 23, 2020
@graingert
Copy link
Member Author

@adiroiban I think there's a race between the travis codecov upload and the github codecov upload

@@ -28,7 +28,8 @@ envlist =

[testenv]
wheel = True
wheel_pep571 = True
wheel_pep517 = True
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when making a directory innaccessable, the TestCase.mktmp can't remove
that directory and the directory cannot be copied into an isolated
location for isolated builds

```
�[0K$ tox -e publishcov
�[1mbuild create: /home/travis/build/twisted/ldaptor/.tox/build
�[0m�[1mbuild installdeps: coverage >= 5.3, pyparsing, passlib, six
�[0m�[1mbuild wheel-make: cleaning up build directory ...
�[0m�[1mbuild wheel-make: commands[0] | pip wheel /home/travis/build/twisted/ldaptor --no-deps --use-pep517 --wheel-dir /home/travis/build/twisted/ldaptor/.tox/dist
�[0m�[33mDEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support�[0m
Processing /home/travis/build/twisted/ldaptor
�[31mERROR: Exception:
Traceback (most recent call last):
  File "/home/travis/build/twisted/ldaptor/.tox/build/lib/python2.7/site-packages/pip/_internal/cli/base_command.py", line 216, in _main
    status = self.run(options, args)
  File "/home/travis/build/twisted/ldaptor/.tox/build/lib/python2.7/site-packages/pip/_internal/cli/req_command.py", line 182, in wrapper
    return func(self, options, args)
  File "/home/travis/build/twisted/ldaptor/.tox/build/lib/python2.7/site-packages/pip/_internal/commands/wheel.py", line 156, in run
    reqs, check_supported_wheels=True
  File "/home/travis/build/twisted/ldaptor/.tox/build/lib/python2.7/site-packages/pip/_internal/resolution/legacy/resolver.py", line 183, in resolve
    discovered_reqs.extend(self._resolve_one(requirement_set, req))
  File "/home/travis/build/twisted/ldaptor/.tox/build/lib/python2.7/site-packages/pip/_internal/resolution/legacy/resolver.py", line 388, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "/home/travis/build/twisted/ldaptor/.tox/build/lib/python2.7/site-packages/pip/_internal/resolution/legacy/resolver.py", line 340, in _get_abstract_dist_for
    abstract_dist = self.preparer.prepare_linked_requirement(req)
  File "/home/travis/build/twisted/ldaptor/.tox/build/lib/python2.7/site-packages/pip/_internal/operations/prepare.py", line 469, in prepare_linked_requirement
    hashes=self._get_linked_req_hashes(req)
  File "/home/travis/build/twisted/ldaptor/.tox/build/lib/python2.7/site-packages/pip/_internal/operations/prepare.py", line 246, in unpack_url
    _copy_source_tree(link.file_path, location)
  File "/home/travis/build/twisted/ldaptor/.tox/build/lib/python2.7/site-packages/pip/_internal/operations/prepare.py", line 186, in _copy_source_tree
    shutil.copytree(source, target, **kwargs)
  File "/opt/python/2.7.15/lib/python2.7/shutil.py", line 222, in copytree
    raise Error, errors
Error: [('/home/travis/build/twisted/ldaptor/_trial_temp/ldaptor.test.test_ldiftree/LDIFTreeEntryTests/test_children_noAccess_file/g7n75M/temp/dc=com.dir/dc=example.dir/ou=metasyntactic.dir/cn=foo.ldif', '/tmp/pip-req-build-w5KDMl/_trial_temp/ldaptor.test.test_ldiftree/LDIFTreeEntryTests/test_children_noAccess_file/g7n75M/temp/dc=com.dir/dc=example.dir/ou=metasyntactic.dir/cn=foo.ldif', "[Errno 13] Permission denied: '/home/travis/build/twisted/ldaptor/_trial_temp/ldaptor.test.test_ldiftree/LDIFTreeEntryTests/test_children_noAccess_file/g7n75M/temp/dc=com.dir/dc=example.dir/ou=metasyntactic.dir/cn=foo.ldif'"), ('/home/travis/build/twisted/ldaptor/_trial_temp/ldaptor.test.test_ldiftree/Dir2LDIF/testNoAccess/HwJxwi/temp/dc=com.dir/dc=example.dir/cn=foo.ldif', '/tmp/pip-req-build-w5KDMl/_trial_temp/ldaptor.test.test_ldiftree/Dir2LDIF/testNoAccess/HwJxwi/temp/dc=com.dir/dc=example.dir/cn=foo.ldif', "[Errno 13] Permission denied: '/home/travis/build/twisted/ldaptor/_trial_temp/ldaptor.test.test_ldiftree/Dir2LDIF/testNoAccess/HwJxwi/temp/dc=com.dir/dc=example.dir/cn=foo.ldif'")]�[0m
�[31mERROR: InvocationError for command /home/travis/build/twisted/ldaptor/.tox/build/bin/pip wheel . --no-deps --use-pep517 --wheel-dir .tox/dist (exited with code 2)
�[0m�[31mERROR: No distributions found in the dist directory found. Please check pyproject.toml, e.g with:
     pip wheel . --use-pep517
```
@graingert
Copy link
Member Author

@adiroiban I think there's a race between the travis codecov upload and the github codecov upload

ah it's not a race condition it's actually uncleaned up chmod calls!

Copy link
Member

@adiroiban adiroiban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look good. Thanks. This can be merged.

@graingert graingert merged commit d5ad70e into twisted:master Sep 24, 2020
@graingert graingert deleted the build-wheel-only-once branch September 24, 2020 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants