Closed Hwesta closed 6 years ago
@kwilcox @Hwesta I'd like to cut a 1.6 release fairly soon. Have you looked at the current code in master recently?
I created a first beta release just now:
https://pypi.python.org/pypi/bagit
We still need things like some release notes but that should be installable for your testing:
pip install bagit>=1.6.0b1
1.6.0b6 is on PyPI now: https://pypi.python.org/pypi/bagit
If anyone has time to test, I'd like to release this this week to parallel @johnscancella's work on bagit-java
I'll update the conda
package and test this week
@acdha:
Is the data_files
key necessary if you are including these files in the MANIFEST.in
file? https://github.com/LibraryOfCongress/bagit-python/blob/master/setup.py#L57
The Dockerfile testing doesn't work. You should add .git
to the .dockerignore
file and change the Dockerfile to
FROM python:3.6
RUN useradd --user-group bagit-tester
RUN install -d -o bagit-tester /bagit
USER bagit-tester
COPY . /bagit WORKDIR /bagit
CMD [ "python", "setup.py", "test" ]
* Did you intend to require the `msgfmt` be available on the `PATH` for anyone to be able to install `bagit`? This isn't documented. I'll admit that I'm ignorant to how localization usually works but generating them on install doesn't seem like the best approach. Can we generate them once before a release?
@kwilcox It's not necessary to install the packages from PyPI but we have to have msgfmt
available to compile messages or it will just silently fall back to English. They're automatically-generated binary files so I'd prefer not to include them in the repo in case we learn about a portability issue.
data_files
was necessary to get it to actually include the files in the sdist package – we can retest in case there was something else going on but when I was testing it yesterday actually getting the .po/.mo files bundled was fragile.
Including .git
in the Docker image is currently necessary to keep setuptools_scm
from crashing. It looks like we could try to handle that conditionally by adding a module which adds a fallback version scheme but that seems like a bit of hassle vs. a single COPY
statement.
msgfmt
is necessary to install from PyPI. I'm just saying we should add a try/except
block around that and default to the english translations? Is that possible?
$ cat Dockerfile
FROM python:3.6
RUN pip install bagit==1.6.0b6
$ docker build -t bagit .
Sending build context to Docker daemon 1.138 MB
Step 1/2 : FROM python:3.6
---> bd214d8035ea
Step 2/2 : RUN pip install bagit==1.6.0b6
---> Running in 846cdf2e5c41
Collecting bagit==1.6.0b6
Downloading bagit-1.6.0b6.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-mcbfpt9y/bagit/setup.py", line 57, in <module>
data_files=get_message_catalogs(),
File "/tmp/pip-build-mcbfpt9y/bagit/setup.py", line 43, in get_message_catalogs
subprocess.check_call(['msgfmt', '-o', mo_file, po_file])
File "/usr/local/lib/python3.6/subprocess.py", line 286, in check_call
retcode = call(*popenargs, **kwargs)
File "/usr/local/lib/python3.6/subprocess.py", line 267, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/local/lib/python3.6/subprocess.py", line 707, in __init__
restore_signals, start_new_session)
File "/usr/local/lib/python3.6/subprocess.py", line 1326, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'msgfmt'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-mcbfpt9y/bagit/
The command '/bin/sh -c pip install bagit==1.6.0b6' returned a non-zero code: 1
Interesting, that doesn’t reproduce for me - I tested it on OS X and Linux w/o msgfmt in the path. We could look into that but it might be better just to start publishing wheels for the popular platforms.
I'm reproducing the same as @kwilcox with a freshly retrieved python:3.6
image, bd214d8035ea
. Maybe yours is out of date, @acdha?
I am not seeing that error with version 17.03.1-ce-mac5 (16048)
of docker on mac.
It doesn't reproduce on a normal Linux system (Red Hat or Ubuntu) or within the latest version of {Docker,python:3.6} for me but since you're encountering it that seems like something we need to add a workaround for. I'm thinking that we can change that to not call msgfmt
if the .mo
file already exists and isn't older than the corresponding .po
file, and have it print a warning if the call fails, but also the simplest fix is to start publishing wheels so there's no code executed at all.
I just uploaded 1.6.0b7 which includes b660351ce082c1521df58a34b8d08424c2259f3e
1.6.0 is now on PyPI: https://pypi.python.org/pypi/bagit
There's also a simple test harness for testing tools like bagit.py against the conformance suite @johnscancella and I have been working on:
https://github.com/LibraryOfCongress/bagit-conformance-suite
It's been about a year since 1.5.4, and I'd love to see a release on PyPI with some of the bug fixes and Python 3.5 support.