Open dimasahmad opened 8 months ago
I'm looking to do similar to overcome a similar situation. I understand the ask for --config
, what's the reasoning behind --outputDir
? I haven't tried your solution, but you don't actually need separate output directories do you? Just copy over the morgan.ini
and re-run, right? Also, is --index-path
not the same as outputDir
?
Reading the source code, morgan.ini is hardcoded to load from --index-path or cwd if undefined.
My goal was similar to how goproxy (the package, not protocol) works. They have the option to change where the storage is located by using an environment variable.
While --index-path might works to set the storage path, I think it would be nice to allow loading different named config with --config option.
Right, and what I'm saying is that I'm working on a patch to support what you're asking for wrt --config
, but I don't think there's a need for --outputDir
since that's already handled by --index-path
which from what I can tell you don't disagree with.
By now I realize that I also need to support multiple projects with different requirements through the same mirror. This can either be implemented with multiple ini files or still with just the one, it doesn't really matter. I'm not sure about --outputDir
though, if you want different directories for different projects, then you can simply run morgan
separately for each one.
@alex-orange, you're saying you're already working on a patch, can you elaborate on your current plan?
I agree, the --config argument is probably the best solution to this as the storage path option is already covered by --index-path.
I just added a pull request #22 to address the config option. It just allows the config to be specified overriding the fixed morgan.ini
in index-path location. So one can use say morgan-tf.ini
, morgan-numpy.ini
, etc, etc.
There's a few reasons I'm doing this:
I am utilizing this tool in my company for my team to centrally pull many packages into our locked down environment, Since every project has their own set of python version, environment, and packages, a single morgan.ini isn't enough. My current workaround is to overwrite morgan.ini content with morgan-[project].ini before running
morgan mirror
and loop for every .ini files.Do you have any plan to support
--config
or--outputDir
argument so it can build a library of packages for many projects instead of just one, or am I missing the docs?