{"action":"created","issue":{"url":"https://api.github.com/repos/asottile/future-fstrings/issues/27","repository_url":"https://api.github.com/repos/asottile/future-fstrings","labels_url":"https://api.github.com/repos/asottile/future-fstrings/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/asottile/future-fstrings/issues/27/comments","events_url":"https://api.github.com/repos/asottile/future-fstrings/issues/27/events","html_url":"https://github.com/asottile/future-fstrings/issues/27","id":373619957,"node_id":"MDU6SXNzdWUzNzM2MTk5NTc=","number":27,"title":"python setup.py install doesn't work","user":{"login":"dahluwalia-ag","id":32851796,"node_id":"MDQ6VXNlcjMyODUxNzk2","avatar_url":"https://avatars2.githubusercontent.com/u/32851796?v=4","gravatar_id":"","url":"https://api.github.com/users/dahluwalia-ag","html_url":"https://github.com/dahluwalia-ag","followers_url":"https://api.github.com/users/dahluwalia-ag/followers","following_url":"https://api.github.com/users/dahluwalia-ag/following{/other_user}","gists_url":"https://api.github.com/users/dahluwalia-ag/gists{/gist_id}","starred_url":"https://api.github.com/users/dahluwalia-ag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dahluwalia-ag/subscriptions","organizations_url":"https://api.github.com/users/dahluwalia-ag/orgs","repos_url":"https://api.github.com/users/dahluwalia-ag/repos","events_url":"https://api.github.com/users/dahluwalia-ag/events{/privacy}","received_events_url":"https://api.github.com/users/dahluwalia-ag/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-24T18:35:14Z","updated_at":"2018-10-24T18:37:05Z","closed_at":null,"author_association":"NONE","body":"Great tool, love the ability to allow fstrings in python2.7!\r\n\r\nI noticed a wierd corner case...\r\n\r\nBroken example:\r\n- Using a python 2.7.15 environment, build my custom \"aperio\" package, which uses future_fstrings (package_requires=['future-fstrings', etc])\r\n- python setup.py sdist\r\n- Change into a different python 2.7.15 environment and install my package\r\n- tar -zxf mypackage.tar.gz\r\n- cd mypackage\r\n- python setup.py install\r\n- launch python and import my package (in caching_setup.py I'm using your fstring hook)\r\n>>> import aperio.common3.caching_lib.caching_setup\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/root/.local/share/virtualenvs/ex-caching-27-abxQ8rec/lib/python2.7/site-packages/aperioCommon-2.5.12-py2.7.egg/aperio/common3/caching_lib/caching_setup.py\", line 14, in <module>\r\n    from aperio.common3.caching_lib.cache_enabled_mixin import CacheEnabledMixin\r\n  File \"/root/.local/share/virtualenvs/ex-caching-27-abxQ8rec/lib/python2.7/site-packages/aperioCommon-2.5.12-py2.7.egg/aperio/common3/caching_lib/cache_enabled_mixin.py\", line 1\r\nSyntaxError: encoding problem: future_fstrings\r\n>>> import future_fstrings\r\n>>> future_fstrings\r\n<module 'future_fstrings' from '/root/.local/share/virtualenvs/ex-caching-27-abxQ8rec/lib/python2.7/site-packages/**future_fstrings-0.4.4-py2.7.egg/future_fstrings.py**'>\r\n\r\nWorking example:\r\n- instead of using python setup.py install, use pip to install my built aperio package\r\n- cd mypackage\r\n- pip install .\r\n- launch python and import my package: no problem!\r\n>>> import aperio.common3.caching_lib.caching_setup\r\n>>> import future_fstrings\r\n>>> future_fstrings\r\n<module 'future_fstrings' from '/root/.local/share/virtualenvs/ex-caching-27-abxQ8rec/lib/python2.7/**site-packages/future_fstrings.pyc**'>\r\n\r\nNot really a problem since I now know how to workaround the issue...but was confusing and maybe you can fix the setup.py install issue. Note the bolded text...the problem appears when future_fstrings comes from egg...\r\n"},"comment":{"url":"https://api.github.com/repos/asottile/future-fstrings/issues/comments/432778320","html_url":"https://github.com/asottile/future-fstrings/issues/27#issuecomment-432778320","issue_url":"https://api.github.com/repos/asottile/future-fstrings/issues/27","id":432778320,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjc3ODMyMA==","user":{"login":"dahluwalia-ag","id":32851796,"node_id":"MDQ6VXNlcjMyODUxNzk2","avatar_url":"https://avatars2.githubusercontent.com/u/32851796?v=4","gravatar_id":"","url":"https://api.github.com/users/dahluwalia-ag","html_url":"https://github.com/dahluwalia-ag","followers_url":"https://api.github.com/users/dahluwalia-ag/followers","following_url":"https://api.github.com/users/dahluwalia-ag/following{/other_user}","gists_url":"https://api.github.com/users/dahluwalia-ag/gists{/gist_id}","starred_url":"https://api.github.com/users/dahluwalia-ag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dahluwalia-ag/subscriptions","organizations_url":"https://api.github.com/users/dahluwalia-ag/orgs","repos_url":"https://api.github.com/users/dahluwalia-ag/repos","events_url":"https://api.github.com/users/dahluwalia-ag/events{/privacy}","received_events_url":"https://api.github.com/users/dahluwalia-ag/received_events","type":"User","site_admin":false},"created_at":"2018-10-24T18:37:05Z","updated_at":"2018-10-24T18:37:05Z","author_association":"NONE","body":"The other workaround: after the procedure as documented in the broken case, simply reinstall future-fstrings: \"pip install future-fstrings --force\"...and then it works.  And the future_fstrings package will be in the same location as in the working example (not from the egg)."}}
{"actor":{"display_login":"dahluwalia-ag"}}