Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distribute wheels to pypi #1218

Open
4 tasks
mattrobenolt opened this issue Mar 27, 2016 · 15 comments
Open
4 tasks

Distribute wheels to pypi #1218

mattrobenolt opened this issue Mar 27, 2016 · 15 comments

Comments

@mattrobenolt
Copy link
Contributor

Granted, we were always able to generate wheels for OSX and Windows, it's now possible to generate wheels for Linux as well.

This provides the benefits of a faster install and doesn't depend on compilers existing on the target machine to install/run uwsgi.

gevent was the first package to publish "manylinux" wheels: https://pypi.python.org/pypi/gevent and there's a project to facilitate generation: https://github.com/pypa/manylinux

I'm not personally super familiar with this, or what it'd take for uwsgi to support, but I'm willing to help. :)

@xrmx
Copy link
Collaborator

xrmx commented Mar 27, 2016

Be our guest then! I don't think anyone will oppose to a pull request :) I see some issues though:

  • centos 5 is not a good baseline for us since IIRC we use some kernel features not available there and we want to build with that features
  • we need to find a configuration that covers most use cases
  • we then need to sort out which configurations willl need a --no-binary switch when installing, unless we can still keep the source installation default of course.

@mattrobenolt
Copy link
Contributor Author

@xrmx GH-1219 is a start. It doesn't do anything fancy, but it fixes generation of platform specific whl files as a first step. So with this, in theory, it'd be possible now to fire up a bunch of virtualenvs to compile against different versions of python and generate all the wheels.

@ushuz
Copy link

ushuz commented Aug 14, 2018

https://github.com/joerick/cibuildwheel can make building manylinux1 wheel on Travis CI really easy.


centos 5 is not a good baseline for us since IIRC we use some kernel features not available there and we want to build with that features

Docker uses the kernel on host machine, instead of the kernel that's available for CentOS 5 distro. So it may not be a problem, but I'm not entirely sure about this, just a thought.

@ipmb
Copy link

ipmb commented Sep 11, 2018

We've been working on getting wheels published to PyPI (including manylinux) under the pyuwsgi package. https://pypi.org/project/pyuwsgi/

There are currently some pre-releases up there if you'd like to test it out.

pip install --pre pyuwsgi
pyuwsgi --help

If you notice any problems with the packaging, please file an issue at https://github.com/lincolnloop/pyuwsgi-wheels. 👍

@mattrobenolt
Copy link
Contributor Author

@ipmb You're doing the Lord's work. 🙏

@ipmb
Copy link

ipmb commented Feb 14, 2019

I think this one is safe to close now. pyuwsgi 2.0.18 has wheels on PyPI.

@mattrobenolt
Copy link
Contributor Author

But uwsgi itself is not. This was at least my original intent.

@ipmb
Copy link

ipmb commented Feb 14, 2019

@unbit doesn't want to change the way uwsgi is distributed. pyuwsgi is the exact same code as uwsgi but moves https://github.com/unbit/uwsgi/blob/d1338dfefe3d9a2de466a9a695cb61fdd055a295/setup.pyuwsgi.py to setup.py prior to building to allow for proper Python wheels. You'll get a script called pyuwsgi that you can run just like uwsgi.

I think this is as close as we're going to get :)

@ipmb ipmb mentioned this issue Feb 14, 2019
@mattrobenolt
Copy link
Contributor Author

@ipmb just wanted to say I've converted one of my pet projects to use pyuwsgi and it works well. :) strutbox/web@a138526

Thanks for tackling this.

@xrmx xrmx mentioned this issue May 10, 2020
@bsolomon1124
Copy link

bsolomon1124 commented May 10, 2020

I'm not sure if I understand the reasoning behind moving this functionality to an entirely different package.

Support for wheels is becoming very widespread thanks to manylinux and the easy of building across a matrix of Python implementations and platforms within CI/CD.

At the risk of starting an argument, it does seem like there are several borderline-misconceptions in this thread.

Namely:

centos 5 is not a good baseline for us since IIRC we use some kernel features not available there and we want to build with that features

What would those be? It's not hinted at in #1376 either. The nature of manylinux1 is that it uses a consistent set of whitelisted libraries. If you have some outside of those, you can use auditwheel or delocate on MacOS to bundle shared libraries with the wheel. I recognize that shared library != kernel features, but am curious as to what those features are.

we then need to sort out which configurations willl need a --no-binary switch when installing, unless we can still keep the source installation default of course.

The very nature of a wheel is that it targets a specific platform because it works there. pip will not arbitrarily install a wheel that doesn't work on a target platform and is very good about only picking "the right" wheel.

@bluetech
Copy link

@ipmb First, thanks for providing pyuwsgi!

I was wondering if you might be able to put up Python 3.9 wheels as well? If there's any way I can help with that, I'd be happy to.

@ipmb
Copy link

ipmb commented Feb 11, 2021

@bluetech tracking Python 3.9 wheels here, lincolnloop/pyuwsgi-wheels#8

@tgross35
Copy link

Reiterating what @bsolomon1124 said, it seems like it would make sense to combine uwsgi and pyuwsgi. @unbit is that a possibility you would consider at this point? Wheels are available for at least 90% of python projects now, I don't see any benefit to maintaining two separate PyPy projects. Anybody who for whatever reason needs to build from source can always do so with pip install uwsgi --no-binary :all:, and this will be the case anyway for any platform unsupported by the wheels.

@ChillarAnand
Copy link

It has been a while since this request is addressed. Any plans on shipping wheels?

@ipmb
Copy link

ipmb commented Nov 9, 2022

I would gladly hand over the reigns to https://github.com/lincolnloop/pyuwsgi-wheels with https://cibuildwheel.readthedocs.io/ the process is pretty straightforward.

LuchnikKek added a commit to Ezereul/Auth_sprint_2 that referenced this issue Mar 13, 2024
uwsgi changed to pyuwsgi, cause (uwsgi has no binary scripts for pip wheel)[unbit/uwsgi#1218]
LuchnikKek added a commit to Ezereul/Auth_sprint_2 that referenced this issue Mar 13, 2024
uwsgi changed to pyuwsgi, cause [uwsgi has no binary scripts for pip wheel](unbit/uwsgi#1218)
Ezereul added a commit to Ezereul/Auth_sprint_2 that referenced this issue Mar 17, 2024
* base structure

* copy ETL dir

* copy configs dir

* poetry dependencies

* remove requirements.txt

* rate limit added

* imports fix

* second redis db for rate limit

* another redis db for rate limit

* path for correct alembic work with imports

* delete debug prints

* exception -> authjwtexception

* basic docker-compose.yml
still not ready and not working, just stash commit

* basic `.env` variables renaming
WIP, just stash commit

* just trying to apply changes from `dev` branch to `feature/docker-compose`.
hope I did not broke anything...

* small .gitignore addition

* Dockerfile for movies_admin

* `entrypoint.sh` to create superuser
`uwsgi.ini` with uwsgi config

* docker-compose.yml rename services

* successful starts (no static)
uwsgi changed to pyuwsgi, cause [uwsgi has no binary scripts for pip wheel](unbit/uwsgi#1218)

* movies_admin with static

* Dockerfile optimized
demo site.conf for multiple services

* ETL starts and works

* Movies API configured and works

* Auth API configured and works
The last broken thing is - Auth API requests works only by 8000 port. Directly from 0.0.0.0:80 Nginx sends errors.
Also did not start tests yet.

* Auth API is set up and works

* Fixed path for tests

* Fixed broken auth service
now docker-compose.yml works perfectly (but tests not)

* Tests for movies
Add `make tests_movies` to run Movies tests.
Fix broken imports in persons tests.

* Auth fixes
tests/ dir now added to image

* Auth routers fix

* Authentication for movies  (#3)

* authentication for movies_api

* imports in auth api

* env path

* Login history partition (#4)

* history partition function

* partition migrations and partition utils

* новая логика для сервиса истории входов после добавления партицирования

* relativedelta вместо условных операторов

* Yandex OAuth (#5)

* history partition function

* partition migrations and partition utils

* новая логика для сервиса истории входов после добавления партицирования

* relativedelta вместо условных операторов

* модель для социального аккаунта, эндпоинт для аутентификации через стороннее приложение

* - сохранение в истории входов при аутентификации через яндекс
- отлаженная аутентификация через яндекс

* linters

* movies_api linters

* метод для создания SocialAccount

* Django admin authorization connected to FastAPI (#6)

* Add User model
Fix migrations was not applied
Error was caused by `dump.sql`, which also contains info about migrations.
Update Filmwork and Genre models to allow store None on some fields which is None on dataset.
Admin still not starts. WIP.

* Errors fix
Backend again starts but not synchronized

* Data migration with superuser WIP
Cannot find where users stored

* Superuser data migration refactoring
Fix error with User schema

* Authentication backend on the home straight
Remains to change raw sql data to be consistent with new User model

* Admin django-backend finally connected to FastAPI
Fix migrations
Fix stuff->staff typo
Small refactoring (not enough, but little is better than nothing)

* rename migration 4->5
remove unused constants

* Setup tracing (#7)

* quick fix:
rename migration file to match ascending order
change cut uuid to username in admin panel

* add Open Telemetry to project
fix OIDC env_prefix

* setup simple tracing

* quickfix

* readme

---------

Co-authored-by: LuchnikKek <[email protected]>
LuchnikKek added a commit to Ezereul/Auth_sprint_2 that referenced this issue Mar 17, 2024
* base structure

* copy ETL dir

* copy configs dir

* poetry dependencies

* remove requirements.txt

* rate limit added

* imports fix

* second redis db for rate limit

* another redis db for rate limit

* path for correct alembic work with imports

* delete debug prints

* exception -> authjwtexception

* basic docker-compose.yml
still not ready and not working, just stash commit

* basic `.env` variables renaming
WIP, just stash commit

* just trying to apply changes from `dev` branch to `feature/docker-compose`.
hope I did not broke anything...

* small .gitignore addition

* Dockerfile for movies_admin

* `entrypoint.sh` to create superuser
`uwsgi.ini` with uwsgi config

* docker-compose.yml rename services

* successful starts (no static)
uwsgi changed to pyuwsgi, cause [uwsgi has no binary scripts for pip wheel](unbit/uwsgi#1218)

* movies_admin with static

* Dockerfile optimized
demo site.conf for multiple services

* ETL starts and works

* Movies API configured and works

* Auth API configured and works
The last broken thing is - Auth API requests works only by 8000 port. Directly from 0.0.0.0:80 Nginx sends errors.
Also did not start tests yet.

* Auth API is set up and works

* Fixed path for tests

* Fixed broken auth service
now docker-compose.yml works perfectly (but tests not)

* Tests for movies
Add `make tests_movies` to run Movies tests.
Fix broken imports in persons tests.

* Auth fixes
tests/ dir now added to image

* Auth routers fix

* Authentication for movies  (#3)

* authentication for movies_api

* imports in auth api

* env path

* Login history partition (#4)

* history partition function

* partition migrations and partition utils

* новая логика для сервиса истории входов после добавления партицирования

* relativedelta вместо условных операторов

* Yandex OAuth (#5)

* history partition function

* partition migrations and partition utils

* новая логика для сервиса истории входов после добавления партицирования

* relativedelta вместо условных операторов

* модель для социального аккаунта, эндпоинт для аутентификации через стороннее приложение

* - сохранение в истории входов при аутентификации через яндекс
- отлаженная аутентификация через яндекс

* linters

* movies_api linters

* метод для создания SocialAccount

* Django admin authorization connected to FastAPI (#6)

* Add User model
Fix migrations was not applied
Error was caused by `dump.sql`, which also contains info about migrations.
Update Filmwork and Genre models to allow store None on some fields which is None on dataset.
Admin still not starts. WIP.

* Errors fix
Backend again starts but not synchronized

* Data migration with superuser WIP
Cannot find where users stored

* Superuser data migration refactoring
Fix error with User schema

* Authentication backend on the home straight
Remains to change raw sql data to be consistent with new User model

* Admin django-backend finally connected to FastAPI
Fix migrations
Fix stuff->staff typo
Small refactoring (not enough, but little is better than nothing)

* rename migration 4->5
remove unused constants

* Setup tracing (#7)

* quick fix:
rename migration file to match ascending order
change cut uuid to username in admin panel

* add Open Telemetry to project
fix OIDC env_prefix

* setup simple tracing

* quickfix

* readme

* Add README.md (#9)

---------

Co-authored-by: Maxim Isaev <[email protected]>
Ezereul added a commit to Ezereul/Auth_sprint_2 that referenced this issue Mar 18, 2024
* base structure

* copy ETL dir

* copy configs dir

* poetry dependencies

* remove requirements.txt

* rate limit added

* imports fix

* second redis db for rate limit

* another redis db for rate limit

* path for correct alembic work with imports

* delete debug prints

* exception -> authjwtexception

* basic docker-compose.yml
still not ready and not working, just stash commit

* basic `.env` variables renaming
WIP, just stash commit

* just trying to apply changes from `dev` branch to `feature/docker-compose`.
hope I did not broke anything...

* small .gitignore addition

* Dockerfile for movies_admin

* `entrypoint.sh` to create superuser
`uwsgi.ini` with uwsgi config

* docker-compose.yml rename services

* successful starts (no static)
uwsgi changed to pyuwsgi, cause [uwsgi has no binary scripts for pip wheel](unbit/uwsgi#1218)

* movies_admin with static

* Dockerfile optimized
demo site.conf for multiple services

* ETL starts and works

* Movies API configured and works

* Auth API configured and works
The last broken thing is - Auth API requests works only by 8000 port. Directly from 0.0.0.0:80 Nginx sends errors.
Also did not start tests yet.

* Auth API is set up and works

* Fixed path for tests

* Fixed broken auth service
now docker-compose.yml works perfectly (but tests not)

* Tests for movies
Add `make tests_movies` to run Movies tests.
Fix broken imports in persons tests.

* Auth fixes
tests/ dir now added to image

* Auth routers fix

* Authentication for movies  (#3)

* authentication for movies_api

* imports in auth api

* env path

* Login history partition (#4)

* history partition function

* partition migrations and partition utils

* новая логика для сервиса истории входов после добавления партицирования

* relativedelta вместо условных операторов

* Yandex OAuth (#5)

* history partition function

* partition migrations and partition utils

* новая логика для сервиса истории входов после добавления партицирования

* relativedelta вместо условных операторов

* модель для социального аккаунта, эндпоинт для аутентификации через стороннее приложение

* - сохранение в истории входов при аутентификации через яндекс
- отлаженная аутентификация через яндекс

* linters

* movies_api linters

* метод для создания SocialAccount

* Django admin authorization connected to FastAPI (#6)

* Add User model
Fix migrations was not applied
Error was caused by `dump.sql`, which also contains info about migrations.
Update Filmwork and Genre models to allow store None on some fields which is None on dataset.
Admin still not starts. WIP.

* Errors fix
Backend again starts but not synchronized

* Data migration with superuser WIP
Cannot find where users stored

* Superuser data migration refactoring
Fix error with User schema

* Authentication backend on the home straight
Remains to change raw sql data to be consistent with new User model

* Admin django-backend finally connected to FastAPI
Fix migrations
Fix stuff->staff typo
Small refactoring (not enough, but little is better than nothing)

* rename migration 4->5
remove unused constants

* Setup tracing (#7)

* quick fix:
rename migration file to match ascending order
change cut uuid to username in admin panel

* add Open Telemetry to project
fix OIDC env_prefix

* setup simple tracing

* quickfix

* readme

* Add README.md (#9)

* Review changes (#12)

* login_via_yandex переписан с возможностью добавления новых провайдеров для oauth

* HTTPStatus вместо хардкодинга

* Добавлена возможность отключать трейсинг с помощью переменной окружения AUTH_ENABLE_TRACING

* Порт и хост для Jaeger вынесены в .env

* Замена старого тайпинга

* Замена магических чисел на константы

* linters

---------

Co-authored-by: LuchnikKek <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants