-
Notifications
You must be signed in to change notification settings - Fork 26
Install the man pages #139
Install the man pages #139
Conversation
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.
There are far too many changes in this PR that should have been discussed in #138 before being implemented
A side-effect of this change is that I figured out how to modify the default setuptools install location. All scripts and macros are now installed in $BASE/bin. This means that virtualenv can take care of updating the $PATH (system-wide installs still need a setup script).
This was by design, avoiding putting things in macros
into /opt/cmsgemos/bin
Another side-effect is that I corrected the license information in the package metadata. It was saying "MIT" while the LICENSE file always contained the text of GPLv3 (there is no way to change back to MIT without contacting every single contributor).
This is probably the discussion that I mention inline. I would have to go back in time to figure out why a given license was (probably arbitrarily) chosen for this project, and probably raise it as a discussion, (contacting contributors on this project is pretty trivial)
pkg/installrpm.sh
Outdated
@@ -23,8 +23,8 @@ cat INSTALLED_FILES.backup|egrep -v 'gempython/__init__.py*' > INSTALLED_FILES | |||
# set permissions | |||
cat <<EOF >>INSTALLED_FILES | |||
%attr(0755,root,root) /opt/cmsgemos/bin/*.py | |||
%attr(0755,root,root) /usr/lib/python*/site-packages/gempython/scripts/*.py | |||
%attr(0755,root,root) /usr/lib/python*/site-packages/gempython/gemplotting/macros/*.py | |||
%attr(0755,root,root) /opt/cmsgemos/lib/python*/site-packages/gempython/scripts/*.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.
This was also explicitly avoided in the initial setup, as in future versions this will be replaced with system site-packages location macros provided by rpm
(currently only works for cc7
)
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.
system site-packages location macros provided by
rpm
Could you provide more details about this? A link to the rpm
doc about this would be great
@@ -4,7 +4,7 @@ name = gempython_gemplotting | |||
author = GEM Online Systems Group | |||
author_email = [email protected] | |||
summary = __summary__ | |||
license = MIT | |||
license = GNU General Public License v3 (GPLv3) |
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.
License changes must be discussed
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.
This is not a license change, this is reflecting the fact that the current license is GPLv3. If you want to contact all copyright holders, fine; but until you get answers the license remains GPLv3.
@@ -20,7 +20,8 @@ classifier = | |||
Topic :: Data Acquisition | |||
Topic :: Scientific | |||
Topic :: Utilities | |||
License :: OSI Approved :: MIT | |||
License :: OSI Approved :: GNU General Public License (GPL) |
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.
Same
# Man files | ||
man_sections = {} | ||
for file in listdir(mandir): | ||
print('Found man page: %s' % file) |
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.
Also, prefer consistent string formatting (avoid %
formatting in favour of .format()
formatting) for all current and future contributions, CONTRIBUTING.md
will be updated to reflect this and a few other changes
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.
For my own ignorance, why is .format()
viewed as superior?
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 don't know about superior... it is the standard that was introduced to eventually replace %
formatting, though I suspect that %
formatting will stick around for quite some time...
Both have a few advantages, though I think .format()
has more.
The primary thing here (in this comment) is maintaining consistency
May I ask what's the rationale for the difference between |
Commit 3d58f5d by... @jsturdy. The commit message ("Initial commit") isn't helpful in telling how the license was chosen. FYI:
|
Mainly, it is to isolate the key executable parts (analyzing scans, which should go in Further down the road, much of this will be replaced with |
20a53ab
to
cc83a72
Compare
It looks like it's required when installing them in the system location. See issue cms-gem-daq-project#138 and PR cms-gem-daq-project#139.
Removed the controversial move to a more standard behavior using standard tools; the |
The LICENSE files contains GPLv3, not MIT
It looks like it's required when installing them in the system location. See issue cms-gem-daq-project#138 and PR cms-gem-daq-project#139.
0a276c3
to
9ed4e3b
Compare
9ed4e3b
to
2a56153
Compare
2a56153
to
a0857c1
Compare
a0857c1
to
cbd8694
Compare
cbd8694
to
6409f25
Compare
6409f25
to
f50904f
Compare
f50904f
to
23cb5e0
Compare
This reverts commit 1fdebc0. It didn't work with Python 2.6.
Comments have been addressed and I'm waiting for another review. |
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.
RPM requirements:
rpm -q --requires -p rpm/gempython_gemplotting-1.0.0-0.0.6.30.dev5.087aeffgit.centos7.python2.7.noarch.rpm
/bin/env
/bin/sh
/usr/bin/env
cmsgemos_gempython >= 0.3.1
config(gempython_gemplotting) = 1.0.0-0.0.6.30.dev5.087aeffgit.centos7.python2.7
numpy >= 1.7
python >= 2.6
python(abi) = 2.7
root_numpy >= 4.7
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PartialHardlinkSets) <= 4.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
tabulate >= 0.4.4
rpmlib(PayloadIsXz) <= 5.2-1
- looks like some mixed shebangs are used, these should be cleaned up in the future
- also in the future, would like to be able to provide these to
bdist_rpm
based on thepython
version, but I believe this would be a significant redesign, moving the majority of thesetup.cfg
stuff into functions imported insetup.py
Description
This PR modifies the Makefile and setup script to install the man pages. They are installed at
$BASE/share/man
, where$BASE
is as follows:$VIRTUAL_ENV
when installed within a virtualenv/usr
when installed system-wideMan pages in the virtualenv can be accessed by setting the correct
$MANPATH
.[outdated]
A side-effect of this change is that I figured out how to modify the default
setuptools
install location. All scripts and macros are now installed in$BASE/bin
. This means thatvirtualenv
can take care of updating the$PATH
(system-wide installs still need a setup script).[/outdated]
Another side-effect is that I corrected the license information in the package metadata. It was saying "MIT" while the
LICENSE
file always contained the text of GPLv3 (there is no way to change back to MIT without contacting every single contributor).The setup script and developer documentation will need to be updated to use the
$MANPATH
.Downsides
man
pages produced when the package is not installed may not be completely accurate. This is a problem formake rpm
since it doesn't work inside avirtualenv
.bin/
and undergempython/...
. I couldn't figure out why.[/outdated]As a result of these downsides and my inability to fix them shortly, this PR is provided more as a list of commits to be cherry-picked.
Types of changes
Motivation and Context
setup.py
:setuptools
) is now used. [/outdated]How Has This Been Tested?
pip
andrpm
packages were built, the former from avirtualenv
and the latter ongem904daq01
.pip
package was installed; scripts and man pages are correctly installed and have the correct permissions.rpm
package contains all files.man
pages built in each environment were (quickly) checked.Since I don't have access to a
rpm
-based machine and I don't want to install one, I couldn't check that therpm
package installs cleanly.Checklist: