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
Port all setup.py files to setuptools #132
Conversation
| download_url="http://www.freeipa.org/page/Downloads", | ||
| platforms=["Linux", "Solaris", "Unix"], | ||
| classifiers=[ | ||
| "Development Status :: 4 - Beta", |
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.
Maybe we can change this to anything else than beta :D
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.
hub am #132
Applying: Draft for a new setup.py
.git/rebase-apply/patch:316: new blank line at EOF.
+
warning: 1 line adds whitespace errors.
Also please fix this
|
This WIP works for me, I like that we get rid of setup.py.in files. I'm looking forward to final version Please fix PEP8 reported error and my inline comments |
|
@mbasti-rh I have removed more hacks and made each setup.py even simpler. |
| @@ -41,6 +41,9 @@ freeipa2-dev-doc | |||
| /dist/ | |||
| /RELEASE | |||
| /rpmbuild/ | |||
| # Build | |||
| ipasetup.py | |||
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.
Why is ipasetup.py ignored?
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.
Makefile autogenerates the file from ipasetup.py.in.
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.
slaps forehead Right.
| for directory in ipaclient ipalib ipaplatform ipapython ipatests; do \ | ||
| pushd $${directory} ; \ | ||
| cp ../ipasetup.py . ; \ | ||
| $(PYTHON) setup.py egg_info ; \ |
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.
IMO it would be better to run setup.py with PYTHONPATH set properly, rather than copy ipasetup.py all the time.
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.
With a copy of ipasetup.py there are no build dependencies between the packages. I can simple chdir into a directory and run python setup.py install.
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.
Alternatively, if sys.path was updated appropriately in each setup.py, we would get rid of copying and allow chdir & run setup.py.
| @@ -10,7 +10,8 @@ man1_MANS = \ | |||
| ipa-client-install.1 \ | |||
| ipa-client-automount.1 \ | |||
| ipa-certupdate.1 \ | |||
| ipa-join.1 | |||
| ipa-join.1 \ | |||
| ipa.1 | |||
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.
Either put the ipa.1 packaging change in a separate commit, or don't do it at all (there must be some way to package custom file with setuptools, right?)
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.
No, setuptools no longer supports non-package data. It can no longer install files to PREFIX/share, PREFIX/man or any other directory except for scripts (PREFIX/share) and package data.
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.
I'm going to move the change to a separate commit.
|
I cannot reinstall packages using your commits |
|
@mbasti-rh I can't reproduce your problem. dnf reinstall works for me. I tested both upgrades from 4.4.2 and reinstall of my RPMs. |
| @@ -1,2 +1 @@ | |||
| include COPYING TODO lite-server.py | |||
| include tests/*/*.py | |||
| include COPYING lite-server.py | |||
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.
Where is this manifest file used? Can't we just drop it? I think it at least should not include lite-server.py.
6a6cdf9
to
4c59f8a
Compare
The file ipapython/ipa.conf is no longer used and not installed. Signed-off-by: Christian Heimes <cheimes@redhat.com>
|
The PR is no longer provisional and ready-to-merge. |
| version=ipalib.__version__, | ||
| license='GPLv3+', | ||
| url='http://freeipa.org/', | ||
| scripts=['ipa'], |
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.
The ipa script is in fact a client script, so I guess it shouldn't be packaged with ipaserver.
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.
Should the script be installed by ipalib or ipaclient? It's a client script but the actual code is in ipalib.
|
LGTM, but shouldn't we also move |
All setup.py files are now using setuptools through a common file ipasetup.py. The file is auto-generated and contain all common settings. Signed-off-by: Christian Heimes <cheimes@redhat.com>
|
I have moved /setup.py into /ipaserver/, fixed some make distclean targets (they were still removing setup.py) and made /ipaclient/setup.u install the ipa script. make rpms is passing. |
|
Jenkins does not complain. ACK. |
PREVIEW, please don't merge yet.
This is my take on FreeIPA's setup.py files. I have moved all common code and constants into ipasetup.py.in and converted all setup.py.in to setup.py. Setup now uses setuptools instead of distutils. I had to move ipa.1 man page to client/man because setuptools does no longer support data_files.
Signed-off-by: Christian Heimes cheimes@redhat.com