pypa / bandersnatch

A PyPI mirror client according to PEP 381 http://www.python.org/dev/peps/pep-0381/
Academic Free License v3.0
453 stars 141 forks source link

os.uname not supported on Windows #19

Closed lordyavin closed 6 years ago

lordyavin commented 6 years ago

I just tried to setup bandersnatch on a windows host and got an error because os.uname() ist not supported. Either switch to platform.uname() or document in the README that Windows isn't supported as a host.

(bandersnatch) C:\Users\john\software\bandersnatch>bandersnatch mirror Traceback (most recent call last): File "C:\Users\john\software\Python36-32\Lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "C:\Users\john\software\Python36-32\Lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\john\software\bandersnatch\Scripts\bandersnatch.exe__main__.py", line 5, in File "c:\users\john\software\bandersnatch\lib\site-packages\bandersnatch\main.py", line 3, in import bandersnatch.master File "c:\users\john\software\bandersnatch\lib\site-packages\bandersnatch\master.py", line 1, in from .utils import USER_AGENT File "c:\users\john\software\bandersnatch\lib\site-packages\bandersnatch\utils.py", line 23, in USER_AGENT = user_agent() File "c:\users\john\software\bandersnatch\lib\site-packages\bandersnatch\utils.py", line 12, in user_agent system = os.uname() AttributeError: module 'os' has no attribute 'uname'

cooperlees commented 6 years ago

Thanks for the report - I have no problem fixing this and I apologize! PR welcome or I will try get to it asap.

cooperlees commented 6 years ago

Please also let me know if there is any pathing / directory issues as well.

lordyavin commented 6 years ago

So far no path issues.

cooperlees commented 6 years ago

3.0.0 will be the first "best effort windows supported" release.

We will try and get some Windows CI runs happening somehow. (None of use are Windows users). We will welcome help :D