Giter Club home page Giter Club logo

simplepypi's People

Contributors

arvind-iyer avatar bcoppersmith avatar kvlung avatar mschwager avatar steiza avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

simplepypi's Issues

Support Python 3 file uploads

On line 200 of simplepypi/simplepypi/bin/simplepypi, using 'r' as the open method causes uploads to fail in Python 3, throwing encoding errors. Switching to 'rb' fixes this.

Support package installs from older versions

Currently, the endpoint for the PyPiPackageHandler only returns the latest version so pip is limited to only being able to install from there. Changing the handler to return a list of all available versions will allow packages to be installed from any version that exists on the server.

Read-only server

Hi!

I'm currently evaluating ways to provide in-house packages and this looks like a good option, but having any of the employees able to upload packages doesn't sound very good (a mistake happens easily).

I had a quick look through the code, and I think simply deleting IndexHandler::post() should be enough? Is there anything else that needs to be done?

Thanks for writing this light pypi server!

Uploading of binary or zip packages

It seems that you have hard coded that all files upload are saved as tar.gz. This is a problem when you are uploading other file formats, such as zip or binary (egg).

I did a very similar twisted pypi server concept and got stuck with the exact issue. I could not find away to tell what the filename was being uploaded from pip.

If you manage to find away, please let me know. But I don't think the behaviour should be to save all files as tar.gz.

Wrong package_path

Hello, i try using your package but i get this error, i don't understand why os.path.join is adding slashes in the package_path since i'm running this on windows

>C:\Python27\python.exe C:\Python27\Scripts\simplepypi
Running on http://127.0.0.1:8000
2017-06-06 11:35:17,861 - INFO - 200 GET / (127.0.0.1) 0.00ms
2017-06-06 11:35:17,913 - WARNING - 404 GET /favicon.ico (127.0.0.1) 1.00ms
2017-06-06 11:35:19,963 - ERROR - Uncaught exception GET /packages (127.0.0.1)
HTTPServerRequest(protocol='http', host='127.0.0.1:8000', method='GET', uri='/packages', version='HTTP/1.1', remote_ip='127.0.0.1', headers={'Accept-Language': 'fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4', 'Accept-Encoding': 'gzip, deflate, sdch, br', 'Host': '127.0.0.1:8000', 'Accept': 'text/html,applicat
ion/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36', 'Dnt': '1', 'Connection': 'keep-alive', 'Referer': 'http://127.0.0.1:8000/', 'Upgrade-Insecure-Requests': '1'
})
Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\tornado\web.py", line 1509, in _execute
    result = method(*self.path_args, **self.path_kwargs)
  File "C:\Python27\Scripts\simplepypi", line 141, in get
    contents = os.listdir(package_path)
WindowsError: [Error 3] The system cannot find the path specified: 'C:\\Python27\\Scripts\\packages/*.*'

Avoid Package Overwrite

I did a cron script to chmod 444 all files inside packages directory.
With this, the user get a HTTP 500 if he tries to upload a new package with same name/version.

Obviously, you cannot be root to do that. Root simply ignores 444 for himself.

If after an upload, a chmod can be issued, this kind of solve this, for now.
Or a file.exists may solve it too.

What do you think?

Best,
Marco

Failure to find package with period in name

Some tools (e.g. Flit) produce packages with a period in their name (e.g. abc.xyz) when building a native namespace package.

When build with pip + Flit the resulting wheel file has the periods replaced by an underscore (e.g. abc_xyz-0.1.2-py3-none-any.whl). This wheel can be uploaded to a simplepypi server, but cannot be downloaded.

When I check http://localhost:8000/packages (where the simplepypi server is located) the package appears in the list as abc.xyz, and when clicked it brings me to http://localhost:8000/packages/abc.xyz, which shows the wheel file abc_xyz-0.1.2-py3-none-any.whl.

I have tried to download it using abc.xyz:

$ pip install -i http://localhost:8000/pypi 'abc.xyz'
Looking in indexes: http://localhost:8000/pypi
ERROR: Could not find a version that satisfies the requirement abc.xyz (from versions: none)
ERROR: No matching distribution found for abc.xyz

And with abc_xyz:

$ pip install -i http://localhost:8000/pypi 'abc_xyz'
Looking in indexes: http://localhost:8000/pypi
ERROR: Could not find a version that satisfies the requirement abc_xyz (from versions: none)
ERROR: No matching distribution found for abc_xyz

I am able to download other packages from http://localhost:8000/pypi so long as they do not have a period in their name.

I am able to download packages with periods in their name from the official PyPI server at pypi.org, and from a PyPI server hosted by Nexus.

License

There is no license in this repository. Was that intended?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.