python / blurb

Command-line tool to manage CPython Misc/NEWS.d entries
Other
9 stars 7 forks source link

Would you support calling blurb test from unpacked sdist? #21

Open hroncok opened 2 months ago

hroncok commented 2 months ago

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 :

https://github.com/python/blurb/blob/07bb15c184856c005d998809739f8c32887b83f1/src/blurb/blurb.py#L831-L836

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!

hugovk commented 1 month ago

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

Perhaps check if the dir begins with "blurb"?

hroncok commented 1 month ago

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

https://github.com/python/blurb/blob/40fd999d63250cf5a1ecd263689c3621c4a60c0b/src/blurb/blurb.py#L645

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

hroncok commented 1 month ago

I solved this by removing the blurb/ prefix form the directory attribute: https://github.com/python/blurb/pull/24