Even with the previous `python.patch` file around, libmagic.so isn't
found. Instead patch it to use an absolute path, using a similar
approach that is used by the `python_magic` package (which is another
libmagic python wrapper library as well).
pep257 is a static analysis tool for checking compliance with Python PEP 257.
I stay with pep257-0.3.2 because newer versions does nos satisfy requirements
for pytest-pep257.
Fixes creating of admin accounts, which is used by NixOps to deploy new
servers. Props to @rbvermaa for reporting the issue and testing it with
NixOps.
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Regression introduced by 5f55788531.
The commit not only changes documentation, but also changed a few
variable names. One of them is $i which now is $f and it contains the
name of the file to wrap.
This was accidentally found by @Profpatsch (thanks!) who found himself
getting the basename of the last patch file to end up in sys.argv[0].
The reason for this is that $i is used in the for loop of the generic
patchPhase and thus is reused later when the Python file is to be
wrapped.
I have also added a small comment noting about this, to be sure that
this won't accidentally occur the next time someone changes variable
names.
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
namebench expects to be run from its own source tree (it uses relative
paths to various resources), make it work.
The current version fails like this:
$ ./result/bin/namebench.py
Traceback (most recent call last):
File "/nix/store/04d29llycr5xcxplfv4gn556nzm1mrl7-python2.7-namebench-1.0.5/bin/.namebench.py-wrapped", line 46, in <module>
(options, supplied_ns, global_ns, regional_ns) = config.GetConfiguration()
File "/nix/store/04d29llycr5xcxplfv4gn556nzm1mrl7-python2.7-namebench-1.0.5/lib/python2.7/site-packages/libnamebench/config.py", line 27, in GetConfiguration
(configured_options, global_ns, regional_ns) = ProcessConfigurationFile(options)
File "/nix/store/04d29llycr5xcxplfv4gn556nzm1mrl7-python2.7-namebench-1.0.5/lib/python2.7/site-packages/libnamebench/config.py", line 100, in ProcessConfigurationFile
general = dict(config.items('general'))
File "/nix/store/z6vp5aix4ks1zdjdry7v7dahg8dd02sy-python-2.7.10/lib/python2.7/ConfigParser.py", line 642, in items
raise NoSectionError(section)
ConfigParser.NoSectionError: No section: 'general'