question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

False positive when checking for inconsistent setup script path on Windows

See original GitHub issue
> python setup.py develop
running develop
Checking .pth file support in C:\project\venv\Lib\site-packages\
C:\project\venv\Scripts\pythonw.exe -E -c pass
TEST PASSED: C:\project\venv\Lib\site-packages\ appears to support .pth files
error: ("Can't get a consistent path to setup script from installation directory", 'c:\\project\\', 'c:\\project')

I am not sure what exactly is the cause (I did not have this problem previously, but suddenly sees it when coming back to work on an old project), but it seems to come from a quirk of realpath():

>>> import os
>>> os.path.realpath('.')
'C:\\Users\\uranusjr\\'
>>> os.path.realpath('../')
'C:\\Users\\'
>>> os.path.realpath('..')
'C:\\Users'

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:6
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
uranusjrcommented, Oct 23, 2018

Of course!

> mkdir project
> cd project
> mkdir src
> [create setup.py]
from setuptools import find_packages, setup

setup(
    name='project',
    version='0.0.0',
    package_dir={'': 'src'},
    packages=find_packages('src'),
)
> python setup.py develop
running develop
Checking .pth file support in C:\Users\uranusjr\Documents\playground\project\.venv\Lib\site-packages\
C:\Users\uranusjr\Documents\playground\project\.venv\Scripts\pythonw.exe -E -c pass
TEST PASSED: C:\Users\uranusjr\Documents\playground\project\.venv\Lib\site-packages\ appears to support .pth files
error: ("Can't get a consistent path to setup script from installation directory", 'c:\\users\\uranusjr\\documents\\playground\\project\\', 'c:\\users\\uranusjr\\documents\\playground\\project')
0reactions
zmwangxcommented, Nov 3, 2018

Oh I missed the PR. Thanks for the pointer.

Read more comments on GitHub >

github_iconTop Results From Across the Web

365 Defender 'SuspiciousScriptDrop' malware was prevented ...
365 Defender 'SuspiciousScriptDrop' malware was prevented alerts, False positive? - Microsoft Q&A.
Read more >
mixed slashes with os.path.join on windows - Stack Overflow
I'm unsure as to why you have mixed slashes in your sys path (have you used a linux os to add some folders?)...
Read more >
Why can't Windows handle an environment variable in Path?
Evidently with enough change to its contents, the PATH variable undergoes some extra processing in the Environment Variables dialog that allows ...
Read more >
False Negative for Log4j v1.x - Tenable Community
Hello! We are new to Nessus Pro. We have begun scanning a number of our systems and found inconsistent results with the log4j...
Read more >
Suppression of false positive warnings - PVS-Studio
Suppression of false positives through diagnostic configuration files (.pvsconfig) · Filtering analyzer messages by a fragment of source code ( ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found