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

Fix Travis test for pyc files in egg-info #1589

Merged
merged 1 commit into from
Nov 12, 2018

Conversation

pganssle
Copy link
Member

This fixes the issue that prevented the initial 40.6.0 release.

The problem is that ! is a special character in YAML syntax.

`!` is a special character in YAML syntax, so this was being interpreted
as `grep pyc ...`, not `! grep pyc ...`

I've also added the same `pyc` test to the normal tests.
@jaraco
Copy link
Member

jaraco commented Nov 12, 2018

It'd be nice not to have to do the test twice. Would it be sufficient to do it in just one place?

@jaraco
Copy link
Member

jaraco commented Nov 12, 2018

Regardless, getting the release out is the most important thing.

@benoit-pierre
Copy link
Member

Yes, we should only keep the test in the install script.

@pganssle
Copy link
Member Author

@jaraco I don't think it actually happens twice in a single build, does it? I think the deploy hook runs separately from the test, so we're just doing this test both as part of the tests and as part of the deployment.

We can probably create a script that wraps bootstrap.py that checks for pyc files in the egg-info, or we can modify bootstrap.py like so:

diff --git a/bootstrap.py b/bootstrap.py
index 8c7d7fc3..61f8ae46 100644
--- a/bootstrap.py
+++ b/bootstrap.py
@@ -59,6 +59,10 @@ def run_egg_info():
 def main():
     ensure_egg_info()
     run_egg_info()
+    with open(os.path.join('setuptools.egg-info', 'SOURCES.txt')) as f:
+        assert not any(x.endswith('.pyc')
+                       for x in map(str.strip, f.readlines()))
+

I suppose it's fine to assume that if there are no pyc files in the version created by the deploy step, but they are built in different environments, and I don't think it hurts anything to make this particular assertion.

@pganssle
Copy link
Member Author

I'm merging, we can figure out the details so I can cut the release, we can figure out the details of how to do the test later.

@pganssle pganssle merged commit 95df56d into pypa:master Nov 12, 2018
@pganssle pganssle deleted the fix_pyc_grep branch February 7, 2019 14:38
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.

3 participants