We have big project which works with *.json
files in the directory: project/data/{locale}/*.json
.
And we need to minify the contents of json files. We already created script which minify all json files in directory, but what we actually need is minimizing json files only in package which will publish, i.e dist/package.v0.1.1.tar.gz
.
Does distutils
provides some API for doing this? Can we minify json data only in production version of our library, which will hosted on PyPi.org?
Maybe something like this:
# setup.py
from distutils import before_publish
@before_publish
def minify_json():
# logic here