Problems deploying from poetry development environment

Loris Bennett loris.bennett at fu-berlin.de
Mon Apr 26 09:19:25 EDT 2021


Hi,

I am developing using poetry and deploying to a directory on an NFS
server.  The steps I have been using are

  1. poetry build
  2. poetry install
  3. PYTHONUSERBASE=/my/nfs/dir pip3 install --user ~/git/funky_prog/dist/funky_prog-0.2.0-py3-none-any.whl --upgrade

This worked.  The programs got deployed and could be run by other users
on the system.

Now I notice the following problems:

  1. The shebang in the deployed entry point script seems to have
     changed from the system python to the development venv.  So where
     as one program has 

       #!/usr/bin/python3
     
     another, more recent one has 

       #!/home/loris/.cache/pypoetry/virtualenvs/generate-publications-csv-tiuUP8_d-py3.6/bin/python3
 
     This seems to have happened after a certain date.

  2. Today Step 3 above failed in that the version printed by the
     deployed program stayed the same although a newer version had been
     installed.  I deleted the program directory under 'site-packages'
     along with two 'dist-info' directories (which corresponded to the
     old version and the new version).  Repeating Step 3 now installs
     just the program directory in 'site-packages', but not the
     'dist-info' directory.

The version number is not hard-coded in the program, but is only
contained in the pyproject.toml and exported to METADATA on build.

I have obviously somehow borked the environment.  Does anyone have any
idea how and what I can do to fix it?

Cheers,

Loris

-- 
This signature is currently under construction.


More information about the Python-list mailing list