{"action":"created","issue":{"url":"https://api.github.com/repos/fedora-python/pyp2rpm/issues/106","labels_url":"https://api.github.com/repos/fedora-python/pyp2rpm/issues/106/labels{/name}","comments_url":"https://api.github.com/repos/fedora-python/pyp2rpm/issues/106/comments","events_url":"https://api.github.com/repos/fedora-python/pyp2rpm/issues/106/events","html_url":"https://github.com/fedora-python/pyp2rpm/issues/106","id":94724065,"number":106,"title":"rpmbuild results on RHEL 6.3 fails","user":{"login":"mcyprian","id":12859854,"avatar_url":"https://avatars.githubusercontent.com/u/12859854?v=3","gravatar_id":"","url":"https://api.github.com/users/mcyprian","html_url":"https://github.com/mcyprian","followers_url":"https://api.github.com/users/mcyprian/followers","following_url":"https://api.github.com/users/mcyprian/following{/other_user}","gists_url":"https://api.github.com/users/mcyprian/gists{/gist_id}","starred_url":"https://api.github.com/users/mcyprian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcyprian/subscriptions","organizations_url":"https://api.github.com/users/mcyprian/orgs","repos_url":"https://api.github.com/users/mcyprian/repos","events_url":"https://api.github.com/users/mcyprian/events{/privacy}","received_events_url":"https://api.github.com/users/mcyprian/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-07-13T13:43:18Z","updated_at":"2015-07-13T13:43:19Z","closed_at":null,"body":"When using pyp2rpm to build rpm packages from pypi for python 2.7 in a virtualenv I get the following error:\n\n(virtual-2.7-env)[codac-dev@localhost pyp2rpm]$ rpmbuild -ba ~/rpmbuild/SPECS/vcstools.spec \nExecuting(%prep): /bin/sh -e /var/tmp/rpm-tmp.hrbbit\n+ umask 022\n+ cd /home/codac-dev/rpmbuild/BUILD\n+ LANG=C\n+ export LANG\n+ unset DISPLAY\n+ cd /home/codac-dev/rpmbuild/BUILD\n+ rm -rf vcstools-0.1.30\n+ /bin/tar -xf -\n+ /usr/bin/gzip -dc /home/codac-dev/rpmbuild/SOURCES/vcstools-0.1.30.tar.gz\n+ STATUS=0\n+ '[' 0 -ne 0 ']'\n+ cd vcstools-0.1.30\n+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .\n+ rm -rf vcstools.egg-info\n+ rm -rf '%{py27dir}'\n+ cp -a . '%{py27dir}'\ncp: cannot copy a directory, `.', into itself, `%{py27dir}'\nerror: Bad exit status from /var/tmp/rpm-tmp.hrbbit (%prep)\n\nI guess it has something todo with the %{py27dir} not expanding but I have no idea what the cause is.\n\nRuben\n\n----------------------------------------\n- Bitbucket: https://bitbucket.org/bkabrda/pyp2rpm/issue/5\n- Originally reported by: [rsmits](http://bitbucket.org/rsmits)\n- Originally created at: 2013-09-12T10:07:51.434\n"},"comment":{"url":"https://api.github.com/repos/fedora-python/pyp2rpm/issues/comments/120932113","html_url":"https://github.com/fedora-python/pyp2rpm/issues/106#issuecomment-120932113","issue_url":"https://api.github.com/repos/fedora-python/pyp2rpm/issues/106","id":120932113,"user":{"login":"mcyprian","id":12859854,"avatar_url":"https://avatars.githubusercontent.com/u/12859854?v=3","gravatar_id":"","url":"https://api.github.com/users/mcyprian","html_url":"https://github.com/mcyprian","followers_url":"https://api.github.com/users/mcyprian/followers","following_url":"https://api.github.com/users/mcyprian/following{/other_user}","gists_url":"https://api.github.com/users/mcyprian/gists{/gist_id}","starred_url":"https://api.github.com/users/mcyprian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcyprian/subscriptions","organizations_url":"https://api.github.com/users/mcyprian/orgs","repos_url":"https://api.github.com/users/mcyprian/repos","events_url":"https://api.github.com/users/mcyprian/events{/privacy}","received_events_url":"https://api.github.com/users/mcyprian/received_events","type":"User","site_admin":false},"created_at":"2015-07-13T13:43:19Z","updated_at":"2015-07-13T13:43:19Z","body":"Then just generate spec file from pyp2rpm using base version 2 (it's default anyway) and change macros accordingly, for example `__python` would point to `/usr/bin/python2.7` and then try what macro for `python_sitelib` produce, I am not quite sure if the `X` in `/usr/lib/python2.X/site-packages` is calculated by value of `__python` macro used. Also, you have to patch shebangs of `bindir` files. I can point you for more information to [Fedora Packaging](http://www.redhat.com/mailman/listinfo/fedora-packaging)\n\nOr for faster respond you can try #fedora-devel on irc.freenode.net.\n\n----------------------------------------\nOriginal comment by: Robert Kuska\n"}}