pip - installing dependency for python package in pip3 install xxx -


does know how pip3 install working? , order of steps executed? dependencies installed prior package stuff copied out of package?

i have created python package , put on pypi server. has lot of dependencies 1 netfilterqueue. project using python3.4 , netfilterqueue works python2.7 , wrote code install in setup.py. change path prepared , patched version of netfilterqueue , tries run setup.py. stuff under nfq/netfilterqueue-0.3.1-p3.3 1 , included in package. looks this( added print command check wrong it):

parent_dir = os.path.dirname(os.path.abspath(__file__)) nfq_dir = os.path.join(parent_dir, 'nfq', 'netfilterqueue-0.3.1-p3.3') f in listdir(parent_dir):     print("package item:", f) try:     if hasattr(sys, 'real_prefix'):           python = 'python'       # virtualenv install     else:           python = 'python3.4'    # normal install     os.chdir(nfq_dir)     subprocess.check_call([python, 'setup.py', 'install'])     os.chdir(parent_dir) 

when download package pypi manually , unzip , try install using sudo python3.4 setup.py install, works fine. problem when use sudo pip3 install mypackage.

it ends error message ( result of executed code mentioned above):

error: [errno 2] no such file or directory: '/tmp/pip_build_root/mypackage' 

netfilterqueue directory:

/tmp/pip_build_root/mypackage/nfq/netfilterqueue-0.3.1-p3.3 

i supposed parent_dir = os.path.dirname(os.path.abspath(file)) rifht place setup.py running from. perhaps wrong.

can light on , solve it?


Comments