How to create "transitional" package?

Thomas Jollans tjol at tjol.eu
Tue Jan 9 18:21:05 EST 2018


On 09/01/18 05:09, INADA Naoki wrote:
> Hi, all.
> 
> Yesterday, I released msgpack-0.5, which was msgpack-python.
> Both packages provide "msgpack" python package.
> 
> I used msgpack in early days, but easy_install crawling website
> and download msgpack-1.0.0.tar.gz, which is msgpack for C instead
> of Python package I upload to PyPI.
> So I renamed msgpack-python but I really dislike it.
> 
> Now pip doesn't such silly crawling so I decided to rename back
> to msgpack.
> To ease transition, I follow what uritemplate.py [1] did (which was
> migrated to uritemplate).
> 
> I released msgpack-python 0.5.  It is empty package.
> But it's metadata contains `install_requires=["msgpack>=0.5"]`.
> 
> Sadly, this breaks upgrading from old version via `pip install -U
> msgpack-python`.
> It does:
> 
> * Install msgpack-0.5 (overwrite msgpack-python 0.4.7)
> * Uninstall msgpack-python 0.4.7 (removes msgapck 0.5!)
> * Install msgpack-python 0.5 (empty!)

Here's a thought: if you distribute a source package for
msgpack-python-0.5, your setup.py is run during installation; you can do
whatever you want. You could check, at msgpack-python installation time,
whether msgpack is still installed correctly - and if it's not, reinstall.

Doing that correctly (and without somehow confusing or angering pip)
might, of course, be easier said than done.




> 
> I found uritemplate.py has same issue.  Maybe pip's behavior was
> changed after migration of uritemplate.py to uritemplate.
> 
> Now what can I do for smooth transition?
> I don't want to back to msgpack-python again.
> 
> [1] https://pypi.python.org/pypi/uritemplate.py
> 
> Regards,
> 
> INADA Naoki  <songofacandy at gmail.com>
> 




More information about the Python-list mailing list