Browse Source

Fix Python builder; bump version; wrap up release.

Stefano Cossu 1 year ago
parent
commit
e30c194960
5 changed files with 19 additions and 11 deletions
  1. 1 1
      MANIFEST.in
  2. 11 3
      Makefile
  3. 3 3
      TODO.md
  4. 1 1
      include/core.h
  5. 3 3
      setup.py

+ 1 - 1
MANIFEST.in

@@ -1,3 +1,3 @@
 graft include
 include cpython/*.h ext/hashmap/*.h ext/tpl/src/*.h ext/log/src/*.h ext/openldap/libraries/liblmdb/*.h
-include src/codec/Makefile
+include Makefile bin/.keep src/codec/Makefile src/codec/*.y src/codec/*.re ext/sqlite/tool/*.c

+ 11 - 3
Makefile

@@ -162,7 +162,8 @@ debug_install: install debug ## Install standard and debug libraries.
 .PHONY: clean ## Clean up artifacts, including language parsers.
 clean:
 	rm -f src/*.[aod] ./*.[aod] src/codec/*.[aod] src/codec/*.out
-	rm -rf build/*
+	rm -rf build/ dist/ lsup_rdf.egg-info/
+	rm -f *.so
 	rm -f include/codec/grammar_*.h
 	rm -f src/codec/{grammar,parser}_*.c
 
@@ -251,9 +252,16 @@ footprint: bin/perftest ## Measure memory footprint by generating and storing 10
 		"massif-visualizer or similar."
 
 
+.PHONY: py_module
+py_module: codec
+	pip3 install build==0.8.0
+	pip3 uninstall -y lsup_rdf
+	python3 -m build
+	pip3 install --no-index --find-links=dist/ lsup_rdf
+
+
 .PHONY: pytest
-pytest: codec_dbg ## Run a test suite for the Python package.
-	pip3 install --user -e .
+pytest: py_module ## Run a test suite for the Python package.
 	python3 test/cpython_test.py
 
 

+ 3 - 3
TODO.md

@@ -26,9 +26,9 @@
 - *D* Transaction control
 - *W* Turtle serialization / deserialization
   - *D* TTL decoder
-  - *W* TTL encoder
-- *W* Enhanced graph operations
-    - *W* Extract unique terms and 2-term tuples
+  - *D* TTL encoder
+- *D* Enhanced graph operations
+    - *D* Extract unique terms and 2-term tuples
 - *P* Full UTF-8 support
 - *P* Extended tests
     - *P* C API

+ 1 - 1
include/core.h

@@ -21,7 +21,7 @@
 #include "xxhash.h"
 
 
-#define LSUP_VERSION "1.0a2"
+#define LSUP_VERSION "1.0a3"
 
 
 // Logging and debugging.

+ 3 - 3
setup.py

@@ -71,15 +71,15 @@ class LSUPInstallCmd(install):
 
     def run(self):
         print("Generating parsers.")
-        target = "debug" if debug else "codec"
-        check_output(["make", "-C", CODEC_DIR, target])
+        target = "debug" if debug else "codec_dbg"
+        check_output(["make", target])
 
         install.run(self)
 
 
 setup(
     name="lsup_rdf",
-    version="1.0a2",
+    version="1.0a3",
     description="Ultra-compact RDF library.",
     # long_description=long_description,
     # long_description_content_type="text/markdown",