-
Notifications
You must be signed in to change notification settings - Fork 31
Closed
Description
Hi!
We are starting to use scip-python
to index our codebases, but have encountered a few issues getting the dependency detection to work properly.
It seems that for some libraries, notably for numpy
, the pip show numpy
may return additional fields, which in turn contain ---
.
In the case of Numpy, the License:
field returns something like this:
Name: numpy
Version: 1.26.0
Summary: Fundamental package for array computing in Python
Home-page: https://numpy.org
Author: Travis E. Oliphant et al.
Author-email: None
License: Copyright (c) 2005-2023, NumPy Developers.
All rights reserved.
[........]
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
----
This binary distribution of NumPy also bundles the following software:
Name: GCC runtime library
Files: .dylibs/*
However this breaks the parsing script at https://github.com/sourcegraph/scip-python/blob/scip/packages/pyright-scip/src/virtualenv/environment.ts#L40C7-L40C7 which expects triple dashes to separate packages.
An easy fix would be to replace split('---')
with split('\n---')
to prevent taking into account any nested ---
.
I have attached a PR.
Thanks for the hard work!
Metadata
Metadata
Assignees
Labels
No labels