Skip to content

Commit 3feed8d

Browse files
committed
v0.1: Prep for initial testing release
1 parent 9eff24a commit 3feed8d

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ node_modules/
88
.coverage
99
htmlcov/
1010
.venv/
11-
snooty.tar.bz2
11+
dist/

Makefile

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
.PHONY: help lint test clean publish
1+
.PHONY: help lint test clean flit-publish
22

33
SYSTEM_PYTHON=$(shell which python3)
4+
PLATFORM=$(shell printf '%s_%s' "$$(uname -s | tr '[:upper:]' '[:lower:]')" "$$(uname -m)")
5+
VERSION=$(shell $(SYSTEM_PYTHON) -c 'exec(open("snooty/__init__.py").read()); print(__version__)')
46
export SOURCE_DATE_EPOCH = $(shell date +%s)
57

6-
# UNAME_S := $(shell uname -s)
7-
# ifeq ($(UNAME_S),Darwin)
8-
# export CPPFLAGS="-I/usr/local/Cellar/snappy/1.1.7_1/include/ -L/usr/local/lib"
9-
# endif
10-
118
help: ## Show this help message
129
@grep -E '^[a-zA-Z_.0-9-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
1310

@@ -27,25 +24,28 @@ lint: .venv/.EXISTS ## Run all linting
2724
test: lint ## Run unit tests
2825
. .venv/bin/activate && python3 -m pytest --cov=snooty
2926

30-
snooty.dist/.EXISTS: test
31-
-rm -rf snooty.dist
27+
dist/snooty/.EXISTS:
28+
$(MAKE) test
29+
-rm -rf snooty.dist dist
30+
mkdir dist
3231
echo 'from snooty import main; main.main()' > snooty.py
3332
PYTHONHOME=`pwd`/.venv python3 -m nuitka \
3433
--standalone --python-flag=no_site --remove-output \
35-
snooty.py
34+
--lto snooty.py
3635
rm snooty.py
36+
mv snooty.dist dist/snooty
3737
touch $@
3838

39-
snooty.tar.bz2: snooty/rstspec.toml snooty.dist/.EXISTS ## Build a binary tarball
39+
dist/snooty-${VERSION}-${PLATFORM}.tar.bz2: snooty/rstspec.toml dist/snooty/.EXISTS ## Build a binary tarball
4040
install -m644 snooty/rstspec.toml snooty.dist
41-
tar -cjf $@ snooty.dist/
41+
tar -cjf $@ -C dist snooty
4242

43-
snooty.tar.bz2.asc: snooty.tar.bz2 ## Build and sign a binary tarball
43+
dist/snooty-${VERSION}-${PLATFORM}.tar.bz2.asc: dist/snooty-${VERSION}-${PLATFORM}.tar.bz2 ## Build and sign a binary tarball
4444
gpg --armor --detach-sig $^
4545

4646
clean: ## Remove all build artifacts
47-
-rm -r snooty.tar.bz2* snooty.py .venv
47+
-rm -r snooty.tar.bz2* snooty.py .venv dist
4848
-rm -rf snooty.dist
4949

50-
publish: test ## Deploy the package to pypi
50+
flit-publish: test ## Deploy the package to pypi
5151
SOURCE_DATE_EPOCH="$$SOURCE_DATE_EPOCH" flit publish

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ home-page = "https://github.com/mongodb/snooty-parser"
1010
classifiers = ["License :: OSI Approved :: Apache Software License"]
1111
requires-python = "~= 3.7"
1212
requires = [
13-
"pymongo[snappy,srv,tls] ~= 3.7.2",
13+
"pymongo[srv,tls] ~= 3.7.2",
1414
"docutils ~= 0.14",
1515
"dnspython ~= 1.16.0",
1616
"watchdog ~= 0.9.0",

0 commit comments

Comments
 (0)