python/blurb

Would you support calling blurb test from unpacked sdist?

hroncok opened this issue · 3 comments

The short story

It would be nice if I could run blurb test from a directory called blurb-1.2.0. Which is the name when I download and unpack the sdist.

Long version

I package blurb for Fedora and I build it from unpackaged sdist. The following code prevents me from running blurb test :

blurb/src/blurb/blurb.py

Lines 831 to 836 in 07bb15c

while not os.path.isdir("blurb"):
old_dir = os.getcwd()
os.chdir("..")
if old_dir == os.getcwd():
# we reached the root and never found it!
sys.exit("Error: Couldn't find the root of your blurb repo!")

It would be great If I did not have to do this:

mkdir blurb
mv tests blurb
cd blurb
blurb test
cd ..
mv blurb/tests .

Would you accept a change that would make this easier for me?

Thanks for blurb!

This sounds reasonable. Although at EuroPython, did you tell me it wasn't so easy?

Perhaps check if the dir begins with "blurb"?

I assumed it won't be that easy, because it is using paths like this:

directory = "blurb/tests/pass"

Yet maybe that does not really matter. I will check.

I solved this by removing the blurb/ prefix form the directory attribute: #24