echoing-nightfall-72095
01/18/2021, 8:03 PMenv: python3.8: No such file or directory
. Probably I’m using the wrong Python distribution or?enough-analyst-54434
01/18/2021, 9:46 PMenough-analyst-54434
01/18/2021, 9:48 PM/usr/bin/env python3
here: https://www.pantsbuild.org/docs/python-target-types#pex_binaryenough-analyst-54434
01/18/2021, 9:49 PMechoing-nightfall-72095
01/19/2021, 6:09 PM./pants run apps/app_a
. But when I try to ./pants package apps/a
I get this error:
Exception: String("Can only merge Directories with no duplicates, but found 3 duplicate entries in :\n\n`__init__.py`: 1.) file digest=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 size=0:\n\n\n\n`__init__.py`: 2.) file digest=c4f92a69e828f5701ffebac2959f704f9fe06ef3d559e146663cb14d44866416 size=1674:\n\n\"\"\"Helper classes for configuration management.\"\"\"\nimport os\n\n\nclass ModelConfig:\n \"\"\"Model configuration class.\"\"\"\n\n def __init__(\n self, name: str, link: str, checksum: str, language_code=\"en\"\n ):\n self.fullname = name\n self.link = link\n self.language_code = language_code\n self.checksum = checksum\n\n def get_fullname(self):\n \"\"\"\n\n Returns\n -------\n Model fullname, i.e. \'<name_of_model>-<version>\'\n \"\"\"\n return self.fullname\n\n def get_name(self):\n \"\"\"\n\n Returns\n -------\n model name without version\n\n \"\"\"\n return self.fullname.split(\"-\")[0]\n\n def get_link(self):\n \"\"\"\n\n Returns\n -------\n model link\n \"\"\"\n return self.link\n\n def get_language_code(self):\n \"\"\"\n\n Returns\n -------\n model language code\n \"\"\"\n return self.language_code\n\n def get_version(self):\n \"\"\"\n\n Returns\n --\n... TRUNCATED contents from 1674B to 1024B (Pass -ldebug to see full contents).\n\n`__init__.py`: 3.) file digest=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 size=0:\n\n")
I’ve not been able to understand what I’m doing wrong.enough-analyst-54434
01/19/2021, 6:12 PMenough-analyst-54434
01/19/2021, 6:19 PM__init__.py
contents in different source roots. That is not good from a Python perspective - nothing to do with Pants. I can explain why its not good if that's not clear - just speak up. To be more concrete though, an example:
Say you have these source roots:
a/root1
a/root2
a/root3
Under the first two you have the same Python package `bob`:
a/root1/bob/
__init__.py
jake.py
a/root2/bob/
__init__py
jane.py
I'm claiming a/root1/bob/__init__.py
and a/root2/bob/__init__.py
have different contents and Pants is complaining (rightly) about that.enough-analyst-54434
01/19/2021, 6:19 PM__init__.py
contents?echoing-nightfall-72095
01/20/2021, 7:54 AM