pypiserver / pypiserver

Minimal PyPI server for uploading & downloading packages with pip/easy_install

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pypi-server update warning

Tonyttlab opened this issue · comments

When I run pypi-server update, I got this warning
C:\Program Files\Python310\lib\site-packages_distutils_hack_init_.py:33: UserWarning: Setuptools is replacing distutils.
warnings.warn("Setuptools is replacing distutils.")
checking 0 packages for newer version

I have a few packages in the folder but it always shows checking 0 pacakges.
Is it checking the updates for the packages?

Thank you.

Hello @Tonyttlab! Thanks for opening up the issue and sorry to hear that the update is not working as expected!
To try getting some more details, could you please provide the exact command you run but with the verbose output?

So this one: pypi-server update -vvv (and of course you can mask any private information if there's something in that output if you'd like :)). That would help to understand a bit better what's happening.

Thanks! ✌️

Hi @dee-me-tree-or-love, this the command I run , and the output.
C:\inetpub\pypiserver>pypi-server update -v -d c:\inetpub\pypiserver\packages
C:\Program Files\Python310\lib\site-packages_distutils_hack_init_.py:33: UserWarning: Setuptools is replacing distutils.
warnings.warn("Setuptools is replacing distutils.")
checking 0 packages for newer version

Thank you.

Hello @Tonyttlab! Thanks a lot for the extra information and I am sorry for my late response.

  1. I have tried to find some time and investigate but I have not managed to fully reproduce the situation and identify the issue.
    Unless this is information that you wouldn't like to share, could I ask which packages you have in the folder?
    Is it possible for you to indicate the amount of packages in this folder (for example running pypi-server
    Are those some of the packages that you have developed/published yourself or are those packages available on global/external pypi.org servers and managed by your pypi-server instance?

I am asking because it is generally the second case that update is used for and it would be great to know if that is the case :) There's more information about it on the README under "Managing the Package Directory".

  1. I have also checked for the warnings.warn("Setuptools is replacing distutils.") warning and this is a good catch! It comes from pypi-server depending on distutils package, but it should not affect how it acts I believe. I will zoom into this separately (#488) and hope to make a patch if it does cause problems.

Thank you very much for your effort to help me find the solution and sorry for all the waiting! ✌️

Hi @dee-me-tree-or-love ,
Thanks for looking into it.
Basically, I'm using the pypi-server as a local pypi partial mirror server so that our users don't need to directly install packages from the Internet.

I utilize the pip download command to download packages to a folder, such as d:\pypi\packages.

Then, I run pypiserver as the index server and set the directory to the folder d:\pypi\packages.

Since it's still in the proof of concept stage, there are not many packages in the folder yet, and there may be no newer versions of packages available.

So, is it expected to see the output message "checking 0 packages for newer versions"?

Thank you.

Hey @Tonyttlab! Thanks for your response! I will be very happy if I manage to help out.

The steps that you take sound all good to me actually. However, just to make sure, can you confirm that if you run the pypi-server run <positional package directory argument> with the same package directory as you specify for pypi-server update (...various flag arguments)* <positional package directory argument> the localhost:<PORT>/simple endpoint lists the expected packages?

It looks like pypi-server is struggling to find the packages in the specified directory. The way it works is defined in src/manage.py::update if you'd like to take a closer look!

Still, I hope this is not too time pressing for you and am sorry for the long reply rate! Unfortunately I won't have the access to my computer in the coming week (taking a little spring break :)) so I might be unable to react more properly. But I hope this double-checking can help you out somewhat and of course I'll return to this as soon as I'm back.

Please let me know what you find!