[BUG] pip install fails
rblake-splunk opened this issue · 3 comments
Describe the bug
running pip install on python 3.7 fails
Clean miniconda 3.7 venv
To Reproduce
Steps to reproduce the behavior:
/opt/miniconda3/bin/conda create -n py3 python=3.7 -y
source /opt/miniconda3/bin/activate py3
pip install git+https://www.github.com/splunk/eventgen.git
Expected behavior
Successful install
Actual behavior
pip install git+https://www.github.com/splunk/eventgen.git
Collecting git+https://www.github.com/splunk/eventgen.git
Cloning https://www.github.com/splunk/eventgen.git to /tmp/pip-req-build-rppyeyvk
Running command git clone -q https://www.github.com/splunk/eventgen.git /tmp/pip-req-build-rppyeyvk
ERROR: Exception:
Traceback (most recent call last):
File "/opt/miniconda3/envs/py3/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 186, in _main
status = self.run(options, args)
File "/opt/miniconda3/envs/py3/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 331, in run
resolver.resolve(requirement_set)
File "/opt/miniconda3/envs/py3/lib/python3.7/site-packages/pip/_internal/legacy_resolve.py", line 177, in resolve
discovered_reqs.extend(self._resolve_one(requirement_set, req))
File "/opt/miniconda3/envs/py3/lib/python3.7/site-packages/pip/_internal/legacy_resolve.py", line 333, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/opt/miniconda3/envs/py3/lib/python3.7/site-packages/pip/_internal/legacy_resolve.py", line 282, in _get_abstract_dist_for
abstract_dist = self.preparer.prepare_linked_requirement(req)
File "/opt/miniconda3/envs/py3/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 516, in prepare_linked_requirement
req, self.req_tracker, self.finder, self.build_isolation,
File "/opt/miniconda3/envs/py3/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 95, in _get_prepared_distribution
abstract_dist.prepare_distribution_metadata(finder, build_isolation)
File "/opt/miniconda3/envs/py3/lib/python3.7/site-packages/pip/_internal/distributions/sdist.py", line 33, in prepare_distribution_metadata
self.req.load_pyproject_toml()
File "/opt/miniconda3/envs/py3/lib/python3.7/site-packages/pip/_internal/req/req_install.py", line 516, in load_pyproject_toml
str(self)
File "/opt/miniconda3/envs/py3/lib/python3.7/site-packages/pip/_internal/pyproject.py", line 75, in load_pyproject_toml
pp_toml = pytoml.load(f)
File "/opt/miniconda3/envs/py3/lib/python3.7/site-packages/pip/_vendor/pytoml/parser.py", line 11, in load
return loads(fin.read(), translate=translate, object_pairs_hook=object_pairs_hook, filename=getattr(fin, 'name', repr(fin)))
File "/opt/miniconda3/envs/py3/lib/python3.7/site-packages/pip/_vendor/pytoml/parser.py", line 24, in loads
ast = _p_toml(src, object_pairs_hook=object_pairs_hook)
File "/opt/miniconda3/envs/py3/lib/python3.7/site-packages/pip/_vendor/pytoml/parser.py", line 341, in _p_toml
s.expect_eof()
File "/opt/miniconda3/envs/py3/lib/python3.7/site-packages/pip/_vendor/pytoml/parser.py", line 123, in expect_eof
return self._expect(self.consume_eof())
File "/opt/miniconda3/envs/py3/lib/python3.7/site-packages/pip/_vendor/pytoml/parser.py", line 163, in _expect
raise TomlError('msg', self._pos[0], self._pos[1], self._filename)
pip._vendor.pytoml.core.TomlError: /tmp/pip-req-build-rppyeyvk/pyproject.toml(4, 1): msg
Do you run eventgen with SA-eventgen?
No
If you are using eventgen with pip module mode (please complete the following information):
- python version: 3.7 miniconda
- Virtual Env is used: Yes
- OS Centos
I'm also seeing this issue on various python versions, as well as when I try to build/install it manually:
$ python3 setup.py sdist
$ pip3 install dist/splunk_eventgen-7.1.0.tar.gz
@li-wu this looks like it has trouble parsing pyproject.toml, can you take a look?
@jmeixensperger sure, let me take a look.
@roryab This issue has been fixed. Thanks for your feedback.