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

Py2app 88 #103

Closed
wants to merge 215 commits into
base: master
from

Conversation

Projects
None yet
4 participants
@derwolfe
Contributor

derwolfe commented Nov 9, 2014

Pushing the first stages of the commit. As of right now, py2app will build the application, but when run, it will fail with the following error:

11/9/14 8:36:46.890 AM mimic[39596]: ImportError: No module named syslog
11/9/14 8:45:41.470 AM mimic[40056]: File "twisted/python/syslog.pyc", line 11, in

I'm pretty sure this is related to how my start-app.py script is working.

Also this has no tests, which will obviously need to change.

@derwolfe

This comment has been minimized.

Show comment
Hide comment
@derwolfe

derwolfe Nov 9, 2014

Contributor

related to issue #88

Contributor

derwolfe commented Nov 9, 2014

related to issue #88

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Nov 12, 2014

Coverage Status

Coverage remained the same when pulling fac1cf5 on derwolfe:py2app-88 into 86e9dd9 on rackerlabs:master.

coveralls commented Nov 12, 2014

Coverage Status

Coverage remained the same when pulling fac1cf5 on derwolfe:py2app-88 into 86e9dd9 on rackerlabs:master.

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Dec 11, 2014

Coverage Status

Coverage remained the same when pulling 092f20c on derwolfe:py2app-88 into c26e5c3 on rackerlabs:master.

coveralls commented Dec 11, 2014

Coverage Status

Coverage remained the same when pulling 092f20c on derwolfe:py2app-88 into c26e5c3 on rackerlabs:master.

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Dec 15, 2014

Coverage Status

Coverage remained the same when pulling 3488f54 on derwolfe:py2app-88 into c26e5c3 on rackerlabs:master.

coveralls commented Dec 15, 2014

Coverage Status

Coverage remained the same when pulling 3488f54 on derwolfe:py2app-88 into c26e5c3 on rackerlabs:master.

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Dec 16, 2014

Coverage Status

Coverage increased (+0.02%) when pulling 8586739 on derwolfe:py2app-88 into c26e5c3 on rackerlabs:master.

coveralls commented Dec 16, 2014

Coverage Status

Coverage increased (+0.02%) when pulling 8586739 on derwolfe:py2app-88 into c26e5c3 on rackerlabs:master.

@derwolfe

This comment has been minimized.

Show comment
Hide comment
@derwolfe

derwolfe Dec 17, 2014

Contributor

Also - my apologies for not TDDing this. If I get some time, I'll try to add some test coverage for run-tests.py and start-app.py

Contributor

derwolfe commented Dec 17, 2014

Also - my apologies for not TDDing this. If I get some time, I'll try to add some test coverage for run-tests.py and start-app.py

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Dec 18, 2014

Coverage Status

Coverage increased (+0.02%) when pulling 4d8f68f on derwolfe:py2app-88 into c26e5c3 on rackerlabs:master.

coveralls commented Dec 18, 2014

Coverage Status

Coverage increased (+0.02%) when pulling 4d8f68f on derwolfe:py2app-88 into c26e5c3 on rackerlabs:master.

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Dec 18, 2014

Coverage Status

Coverage increased (+0.02%) when pulling 4d8f68f on derwolfe:py2app-88 into c26e5c3 on rackerlabs:master.

coveralls commented Dec 18, 2014

Coverage Status

Coverage increased (+0.02%) when pulling 4d8f68f on derwolfe:py2app-88 into c26e5c3 on rackerlabs:master.

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Dec 18, 2014

Coverage Status

Coverage increased (+0.02%) when pulling 026d400 on derwolfe:py2app-88 into c26e5c3 on rackerlabs:master.

coveralls commented Dec 18, 2014

Coverage Status

Coverage increased (+0.02%) when pulling 026d400 on derwolfe:py2app-88 into c26e5c3 on rackerlabs:master.

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Dec 18, 2014

Coverage Status

Coverage increased (+0.02%) when pulling f570897 on derwolfe:py2app-88 into c26e5c3 on rackerlabs:master.

coveralls commented Dec 18, 2014

Coverage Status

Coverage increased (+0.02%) when pulling f570897 on derwolfe:py2app-88 into c26e5c3 on rackerlabs:master.

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Dec 18, 2014

Coverage Status

Coverage increased (+0.02%) when pulling aa91191 on derwolfe:py2app-88 into c26e5c3 on rackerlabs:master.

coveralls commented Dec 18, 2014

Coverage Status

Coverage increased (+0.02%) when pulling aa91191 on derwolfe:py2app-88 into c26e5c3 on rackerlabs:master.

@derwolfe

This comment has been minimized.

Show comment
Hide comment
@derwolfe

derwolfe Dec 19, 2014

Contributor

This was just rebased against master, so it should have the most recent plugins.

Contributor

derwolfe commented Dec 19, 2014

This was just rebased against master, so it should have the most recent plugins.

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Dec 19, 2014

Coverage Status

Coverage remained the same when pulling 150ca69 on derwolfe:py2app-88 into 402715c on rackerlabs:master.

coveralls commented Dec 19, 2014

Coverage Status

Coverage remained the same when pulling 150ca69 on derwolfe:py2app-88 into 402715c on rackerlabs:master.

@derwolfe

This comment has been minimized.

Show comment
Hide comment
@derwolfe

derwolfe Dec 19, 2014

Contributor

I need to add a note to the docs about the fact that this requires a brewed or non-system python to be used.

Contributor

derwolfe commented Dec 19, 2014

I need to add a note to the docs about the fact that this requires a brewed or non-system python to be used.

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Dec 19, 2014

Coverage Status

Coverage remained the same when pulling 26e4617 on derwolfe:py2app-88 into 402715c on rackerlabs:master.

coveralls commented Dec 19, 2014

Coverage Status

Coverage remained the same when pulling 26e4617 on derwolfe:py2app-88 into 402715c on rackerlabs:master.

@derwolfe

This comment has been minimized.

Show comment
Hide comment
@derwolfe

derwolfe Dec 19, 2014

Contributor

Just as an FYI - I'm going to be on vacation until next Friday, so I'll have sporadic access to email.

Contributor

derwolfe commented Dec 19, 2014

Just as an FYI - I'm going to be on vacation until next Friday, so I'll have sporadic access to email.

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Dec 29, 2014

Coverage Status

Coverage remained the same when pulling 8b99a79 on derwolfe:py2app-88 into 402715c on rackerlabs:master.

coveralls commented Dec 29, 2014

Coverage Status

Coverage remained the same when pulling 8b99a79 on derwolfe:py2app-88 into 402715c on rackerlabs:master.

@derwolfe

This comment has been minimized.

Show comment
Hide comment
@derwolfe

derwolfe Dec 30, 2014

Contributor

I'm going to try to setup tox to run the builder, then I'll put this up for review.

Contributor

derwolfe commented Dec 30, 2014

I'm going to try to setup tox to run the builder, then I'll put this up for review.

@glyph

This comment has been minimized.

Show comment
Hide comment
@glyph

glyph Dec 30, 2014

Collaborator

Fantastic. Thanks.

Collaborator

glyph commented Dec 30, 2014

Fantastic. Thanks.

@derwolfe

This comment has been minimized.

Show comment
Hide comment
@derwolfe

derwolfe Dec 31, 2014

Contributor

In order to get travis to build the application using an OSX builder, there is a feature flag that needs to be enabled manually by travis's staff. They ask that you send them an email requesting the OSX builder feature be turned on. The steps are detailed at http://docs.travis-ci.com/user/multi-os/#Manual-intervention-required.

If this is ok, could you @glyph or @lekhajee send an email to them asking them to turn the feature on?

Thanks!

Contributor

derwolfe commented Dec 31, 2014

In order to get travis to build the application using an OSX builder, there is a feature flag that needs to be enabled manually by travis's staff. They ask that you send them an email requesting the OSX builder feature be turned on. The steps are detailed at http://docs.travis-ci.com/user/multi-os/#Manual-intervention-required.

If this is ok, could you @glyph or @lekhajee send an email to them asking them to turn the feature on?

Thanks!

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Dec 31, 2014

Coverage Status

Coverage remained the same when pulling 35be1da on derwolfe:py2app-88 into 402715c on rackerlabs:master.

coveralls commented Dec 31, 2014

Coverage Status

Coverage remained the same when pulling 35be1da on derwolfe:py2app-88 into 402715c on rackerlabs:master.

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Dec 31, 2014

Coverage Status

Coverage remained the same when pulling 01cde41 on derwolfe:py2app-88 into 402715c on rackerlabs:master.

coveralls commented Dec 31, 2014

Coverage Status

Coverage remained the same when pulling 01cde41 on derwolfe:py2app-88 into 402715c on rackerlabs:master.

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Dec 31, 2014

Coverage Status

Coverage remained the same when pulling ec528ca on derwolfe:py2app-88 into 402715c on rackerlabs:master.

coveralls commented Dec 31, 2014

Coverage Status

Coverage remained the same when pulling ec528ca on derwolfe:py2app-88 into 402715c on rackerlabs:master.

@lekhajee

This comment has been minimized.

Show comment
Hide comment
@lekhajee

lekhajee Jan 5, 2015

Contributor

Reply from travis support:

Hi Lekha,

Thanks for getting in touch. While I would love to enable multi-os for you, we're currently unable to accommodate projects with "language: python" (see: travis-ci/travis-ci#2312) If this is something that interests you, I would strongly recommend reaching out to dstufft, not least because you're both Rackers ;-) We look forward to offering multi-os to Python projects!

Have a great day,

Daniel Buch
support@travis-ci.com

Contributor

lekhajee commented Jan 5, 2015

Reply from travis support:

Hi Lekha,

Thanks for getting in touch. While I would love to enable multi-os for you, we're currently unable to accommodate projects with "language: python" (see: travis-ci/travis-ci#2312) If this is something that interests you, I would strongly recommend reaching out to dstufft, not least because you're both Rackers ;-) We look forward to offering multi-os to Python projects!

Have a great day,

Daniel Buch
support@travis-ci.com

@derwolfe

This comment has been minimized.

Show comment
Hide comment
@derwolfe

derwolfe Jan 5, 2015

Contributor

@lekhajee Thanks for getting in touch with them. I'll see how the pyca/cryptography project is handling this, as it looks like they have multi OS support. I believe that they are doing a bit of the virtualenv setup themselves and setting the language parameter to C.

Contributor

derwolfe commented Jan 5, 2015

@lekhajee Thanks for getting in touch with them. I'll see how the pyca/cryptography project is handling this, as it looks like they have multi OS support. I believe that they are doing a bit of the virtualenv setup themselves and setting the language parameter to C.

@lekhajee

This comment has been minimized.

Show comment
Hide comment
@lekhajee

lekhajee Jan 5, 2015

Contributor

@derwolfe: ah ok, interesting. Thank you for looking at it.

Contributor

lekhajee commented Jan 5, 2015

@derwolfe: ah ok, interesting. Thank you for looking at it.

@derwolfe

This comment has been minimized.

Show comment
Hide comment
@derwolfe

derwolfe Jan 7, 2015

Contributor

I've emailed travis about setting up multi-os support for my fork, with the intention of setting up the project as a C project.

If they agree, I'll start experimenting with build configurations.

Contributor

derwolfe commented Jan 7, 2015

I've emailed travis about setting up multi-os support for my fork, with the intention of setting up the project as a C project.

If they agree, I'll start experimenting with build configurations.

@derwolfe

This comment has been minimized.

Show comment
Hide comment
@derwolfe

derwolfe Mar 4, 2015

Contributor

It looks like it (it being the py2app portion of setup.py) isn't pulling in the mimic/twisted/plugins/mimic.py file.

Contributor

derwolfe commented Mar 4, 2015

It looks like it (it being the py2app portion of setup.py) isn't pulling in the mimic/twisted/plugins/mimic.py file.

@glyph

This comment has been minimized.

Show comment
Hide comment
@glyph

glyph Mar 4, 2015

Collaborator

Could this be because we added the --develop option to tox in b4f61dd in order to get the coverage report to accurately reflect the plugin file being imported?

Collaborator

glyph commented Mar 4, 2015

Could this be because we added the --develop option to tox in b4f61dd in order to get the coverage report to accurately reflect the plugin file being imported?

@derwolfe

This comment has been minimized.

Show comment
Hide comment
@derwolfe

derwolfe Mar 4, 2015

Contributor

I'm pretty sure it isn't - it is happening locally as well.

Contributor

derwolfe commented Mar 4, 2015

I'm pretty sure it isn't - it is happening locally as well.

@glyph

This comment has been minimized.

Show comment
Hide comment
@glyph

glyph Mar 4, 2015

Collaborator

Hrm. But only after merging master?

Collaborator

glyph commented Mar 4, 2015

Hrm. But only after merging master?

@glyph

This comment has been minimized.

Show comment
Hide comment
@glyph
Collaborator

glyph commented Mar 4, 2015

@derwolfe

This comment has been minimized.

Show comment
Hide comment
@derwolfe

derwolfe Mar 4, 2015

Contributor

It looks this is the commit that introduced the change: b71c72f

Contributor

derwolfe commented Mar 4, 2015

It looks this is the commit that introduced the change: b71c72f

@derwolfe

This comment has been minimized.

Show comment
Hide comment
@derwolfe

derwolfe Mar 4, 2015

Contributor

Do you get the same error if you run ./build-app.sh?

Contributor

derwolfe commented Mar 4, 2015

Do you get the same error if you run ./build-app.sh?

@glyph

This comment has been minimized.

Show comment
Hide comment
@glyph

glyph Mar 4, 2015

Collaborator

No, then I get exceptions.ImportError: No module named mimic, same as on travis…

Collaborator

glyph commented Mar 4, 2015

No, then I get exceptions.ImportError: No module named mimic, same as on travis…

@glyph

This comment has been minimized.

Show comment
Hide comment
@glyph

glyph Mar 4, 2015

Collaborator

Looking inside site_packages.zip, I don't even see twisted's own plugins:

★ unzip -l dist/mimic.app/Contents/Resources/lib/python2.7/site-packages.zip | grep twisted/plugins
      499  03-03-15 17:58   twisted/plugins/__init__.pyc
     9751  03-03-15 17:58   twisted/plugins/dropin.cache
Collaborator

glyph commented Mar 4, 2015

Looking inside site_packages.zip, I don't even see twisted's own plugins:

★ unzip -l dist/mimic.app/Contents/Resources/lib/python2.7/site-packages.zip | grep twisted/plugins
      499  03-03-15 17:58   twisted/plugins/__init__.pyc
     9751  03-03-15 17:58   twisted/plugins/dropin.cache
@derwolfe

This comment has been minimized.

Show comment
Hide comment
@derwolfe

derwolfe Mar 4, 2015

Contributor

Yes - I just found that as well! It looks like it generates a dropin.cache, but nothing else..

Contributor

derwolfe commented Mar 4, 2015

Yes - I just found that as well! It looks like it generates a dropin.cache, but nothing else..

@glyph

This comment has been minimized.

Show comment
Hide comment
@glyph

glyph Mar 4, 2015

Collaborator

It's possible that --system-site-packages is causing some confusion. Have you had any better luck with your own pyobjc?

Collaborator

glyph commented Mar 4, 2015

It's possible that --system-site-packages is causing some confusion. Have you had any better luck with your own pyobjc?

@glyph

This comment has been minimized.

Show comment
Hide comment
@glyph

glyph Mar 4, 2015

Collaborator

Without --system-site-packages, I'm back to the scan_code error.

Collaborator

glyph commented Mar 4, 2015

Without --system-site-packages, I'm back to the scan_code error.

@derwolfe

This comment has been minimized.

Show comment
Hide comment
@derwolfe

derwolfe Mar 4, 2015

Contributor

With the scan_code error, which version of py2app are you running? If I remember correctly, newer versions of py2app have an issue. I need to pin the py2app dependencies, instead of just minimum requirements.

Contributor

derwolfe commented Mar 4, 2015

With the scan_code error, which version of py2app are you running? If I remember correctly, newer versions of py2app have an issue. I need to pin the py2app dependencies, instead of just minimum requirements.

@glyph

This comment has been minimized.

Show comment
Hide comment
@glyph

glyph Mar 4, 2015

Collaborator

Yeah, I was just messing around with py2app versions…

Collaborator

glyph commented Mar 4, 2015

Yeah, I was just messing around with py2app versions…

@glyph

This comment has been minimized.

Show comment
Hide comment
@glyph

glyph Mar 4, 2015

Collaborator

I think the version with the error was 0.9?

Collaborator

glyph commented Mar 4, 2015

I think the version with the error was 0.9?

@glyph

This comment has been minimized.

Show comment
Hide comment
@glyph

glyph Mar 4, 2015

Collaborator

When pinning it to 0.8.1, I now get this at the end of the test run:

+ python setup.py py2app
Traceback (most recent call last):
  File "setup.py", line 8, in <module>
    from py2app.build_app import py2app
  File "/Users/glyph/Projects/Mimic/venv-app/lib/python2.7/site-packages/py2app/__init__.py", line 31, in <module>
    __version__ = pkg_resources.require('py2app')[0].version
  File "/Users/glyph/Projects/Mimic/venv-app/lib/python2.7/site-packages/pkg_resources/__init__.py", line 918, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/Users/glyph/Projects/Mimic/venv-app/lib/python2.7/site-packages/pkg_resources/__init__.py", line 810, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (modulegraph 0.10.4 (/Users/glyph/Projects/Mimic/venv-app/lib/python2.7/site-packages), Requirement.parse('modulegraph>=0.11'), set(['py2app']))
+ ./dist/mimic.app/Contents/MacOS/run-tests
build-app.sh: line 33: ./dist/mimic.app/Contents/MacOS/run-tests: No such file or directory
Collaborator

glyph commented Mar 4, 2015

When pinning it to 0.8.1, I now get this at the end of the test run:

+ python setup.py py2app
Traceback (most recent call last):
  File "setup.py", line 8, in <module>
    from py2app.build_app import py2app
  File "/Users/glyph/Projects/Mimic/venv-app/lib/python2.7/site-packages/py2app/__init__.py", line 31, in <module>
    __version__ = pkg_resources.require('py2app')[0].version
  File "/Users/glyph/Projects/Mimic/venv-app/lib/python2.7/site-packages/pkg_resources/__init__.py", line 918, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/Users/glyph/Projects/Mimic/venv-app/lib/python2.7/site-packages/pkg_resources/__init__.py", line 810, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (modulegraph 0.10.4 (/Users/glyph/Projects/Mimic/venv-app/lib/python2.7/site-packages), Requirement.parse('modulegraph>=0.11'), set(['py2app']))
+ ./dist/mimic.app/Contents/MacOS/run-tests
build-app.sh: line 33: ./dist/mimic.app/Contents/MacOS/run-tests: No such file or directory
@derwolfe

This comment has been minimized.

Show comment
Hide comment
@derwolfe

derwolfe Mar 4, 2015

Contributor

I'm now getting odd framework python build errors on my machine.

Contributor

derwolfe commented Mar 4, 2015

I'm now getting odd framework python build errors on my machine.

@glyph

This comment has been minimized.

Show comment
Hide comment
@glyph

glyph Mar 4, 2015

Collaborator

I think one thing that might be screwing it up is the fact that if py2app is available at all, the setup.py no longer provides any of the other necessary build metadata to the build process, such as package_dir or packages.

Collaborator

glyph commented Mar 4, 2015

I think one thing that might be screwing it up is the fact that if py2app is available at all, the setup.py no longer provides any of the other necessary build metadata to the build process, such as package_dir or packages.

@glyph

This comment has been minimized.

Show comment
Hide comment
@glyph

glyph Mar 4, 2015

Collaborator

I am deeply confused. py2app appears to have regressed in some way since the last time I was looking at this; and not just regressed in its current version, but older versions are broken too. I really don't understand what is going on, but clearly that AttributeError is a py2app bug and we should report it.

Collaborator

glyph commented Mar 4, 2015

I am deeply confused. py2app appears to have regressed in some way since the last time I was looking at this; and not just regressed in its current version, but older versions are broken too. I really don't understand what is going on, but clearly that AttributeError is a py2app bug and we should report it.

@derwolfe

This comment has been minimized.

Show comment
Hide comment
@derwolfe

derwolfe Mar 4, 2015

Contributor

I'm quite confused myself. One way or another, I'm now getting the following error, using the same steps as before.

2015-03-03 21:46:09.077 run-tests[33926:88303] A Python runtime not could be located. You may need to install a framework build of Python, or edit the PyRuntimeLocations array in this application's Info.plist file.

The env is still being built using the system python too.

Contributor

derwolfe commented Mar 4, 2015

I'm quite confused myself. One way or another, I'm now getting the following error, using the same steps as before.

2015-03-03 21:46:09.077 run-tests[33926:88303] A Python runtime not could be located. You may need to install a framework build of Python, or edit the PyRuntimeLocations array in this application's Info.plist file.

The env is still being built using the system python too.

@glyph

This comment has been minimized.

Show comment
Hide comment
@glyph

glyph Mar 4, 2015

Collaborator

one of the many bugs blocking us seems to be https://bitbucket.org/ronaldoussoren/py2app/issue/156/virtualenvpy-recipe-calls-methods-renamed so I've commented there...

Collaborator

glyph commented Mar 4, 2015

one of the many bugs blocking us seems to be https://bitbucket.org/ronaldoussoren/py2app/issue/156/virtualenvpy-recipe-calls-methods-renamed so I've commented there...

@glyph

This comment has been minimized.

Show comment
Hide comment
@glyph

glyph Mar 4, 2015

Collaborator

Since that bug is in the virtualenv recipe, I have now been messing around with using --user installation to get things set up instead of a virtualenv. I'm getting a little further, but still having trouble generating the plugin.cache and getting it into the zip file.

Collaborator

glyph commented Mar 4, 2015

Since that bug is in the virtualenv recipe, I have now been messing around with using --user installation to get things set up instead of a virtualenv. I'm getting a little further, but still having trouble generating the plugin.cache and getting it into the zip file.

@glyph glyph referenced this pull request Mar 4, 2015

Merged

Mac app redux #191

@lekhajee

This comment has been minimized.

Show comment
Hide comment
@lekhajee

lekhajee Mar 11, 2015

Contributor

Merged #191, which includes all the commits from this PR. Closing this. Thanks!

Contributor

lekhajee commented Mar 11, 2015

Merged #191, which includes all the commits from this PR. Closing this. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment