-
-
Notifications
You must be signed in to change notification settings - Fork 745
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
[WIP] Setuptools packaging improvements - make each st2 component packagable and installable via package #1677
Conversation
…to dennybaa-setuptools-fixes
…ements to preserve a stable order.
…e common code to "dist_utils.py" module and copy this module over to each component package directory during build step. Update affected code.
…es to each component package directory.
…posed from README and CHANGELOG file.
…or each st2 component.
st2_version file. Note: For now we just copy over global __init__.py from st2common during build preparation step.
Setuptools packaging improvements - make each st2 component packagable and installable via package
…in each component directory.
…ways use correct and latest version of pip. Also update virtualenv target to install latest version of pip instead of doing it in the requirements target.
…y so it doesn't include changelog in the package description.
requirements.txt.
… target also works locally in a vagrant vm.
…ges under virtualenv.
# Make sure we use latest version of pip | ||
$(VIRTUALENV_DIR)/bin/pip install --upgrade pip | ||
|
||
# Install stdeb st2client build dependency |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Kami what's stdeb?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a Python package we use in combination with setup.py to build a Debian package for st2client
.
I wasn't aware of it before yesterday either. I added it here to make "make deb" self sustaining and now it also works in a local environment. Previously, this package would only magically get installed inside one of our CI workflows...
a39a38a
to
210fa98
Compare
duplicating the code across setup.py files. Note: This file is copied over from the common location to each component directory during the build step.
…py instead of duplicating the code across setup.py files. Note: This file is copied over from the common location to each component directory during the build step.
This is not relevant anymore since #1917 was merged. |
This pull requests builds on top of of #1647 and #1668.
I spent a lot of time finishing, polishing and testing all the changes from #1668 locally. Everything worked and looked fine so I decided to merge it into master. Sadly this turned out to be a mistake - there were many, many issues with packaging and other workflows used by our CI.
After 3-4 hours of digging in and fixing issues, I still haven't managed to fix all of them so I decided to revert changes in the master and unbreak it. I believe that's better than trying to rush to whole thing. Next step will be to address all the issues and run all the packaging and related workflows on this branch and only merge it into master when everything passes.
I will work with / ask @DoriftoShoes for help with running everything on a particular branch (not sure if we are there yet, might require some changes).
The biggest offenders currently are:
MANIFEST.in
and replacing it with collecting all the code packages inside thesetup.py
files.This branch includes the following changes and improvements:
dist_utils.py
module which is copied over to each component during build step and used inside setup.py instead of copy and pasting code over in setup.py.license
andurl
attribute.long_description
attribute to each setup.py file. This attribute is generated by combining togetherREADME.rest
andCHANGELOG.rst
file.sdist
Makefilet target which generates.tar.gz
andwheel
archive for each component.__version
attribute from each package init.py file. For now we simply copy over init.py from st2common. This way we don't break out existing release / build workflow, but eventually we should move to per-package version.flask
,flask_json
. This was actually done by @dennybaa, but I verified the changes and I'm pointing it out there to make it easier to track.requirements.txt
file. This way we make sure generated requirements files are always sorted the same.TO FIX: