Skip to content

Commit b6fa37a

Browse files
committed
Package libuv/configure in the sdist
1 parent 448eea3 commit b6fa37a

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

MANIFEST.in

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
recursive-include examples *.py
22
recursive-include tests *.py *.pem
33
recursive-include uvloop *.pyx *.pxd *.pxi *.py
4-
recursive-include vendor/libuv *.c *.h LICENSE *.sh *.am *.ac *.m4 *.pc.in
4+
recursive-include vendor/libuv *
5+
recursive-exclude vendor/libuv/.git *
6+
recursive-exclude vendor/libuv/docs *
7+
recursive-exclude vendor/libuv/img *
58
include LICENSE README.rst Makefile

Makefile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: compile clean all distclean test debug sdist clean-libuv sdist-upload
1+
.PHONY: compile clean all distclean test debug sdist clean-libuv sdist-upload sdist-libuv
22

33

44
all: clean compile
@@ -15,6 +15,10 @@ clean-libuv:
1515
git -C vendor/libuv clean -dfX
1616

1717

18+
sdist-libuv: clean-libuv
19+
/bin/sh vendor/libuv/autogen.sh
20+
21+
1822
distclean: clean clean-libuv
1923

2024

@@ -35,9 +39,9 @@ test:
3539
python -m unittest discover -s tests
3640

3741

38-
sdist: clean compile test clean-libuv
42+
sdist: clean compile test sdist-libuv
3943
python setup.py sdist
4044

4145

42-
sdist-upload: clean compile test clean-libuv
46+
sdist-upload: clean compile test sdist-libuv
4347
python setup.py sdist upload

setup.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ def build_libuv(self):
2727

2828
j_flag = '-j{}'.format(os.cpu_count() or 1)
2929

30-
subprocess.run(['/bin/sh', 'autogen.sh'], cwd=LIBUV_DIR, env=env,
31-
check=True)
30+
if not os.path.exists(os.path.join(LIBUV_DIR, 'configure')):
31+
subprocess.run(['/bin/sh', 'autogen.sh'], cwd=LIBUV_DIR, env=env,
32+
check=True)
33+
3234
subprocess.run(['./configure'], cwd=LIBUV_DIR, env=env, check=True)
3335
subprocess.run(['make', j_flag], cwd=LIBUV_DIR, env=env, check=True)
3436

0 commit comments

Comments
 (0)