diff --git a/Makefile.in b/Makefile.in index bd72b9a26..5ba7235a6 100644 --- a/Makefile.in +++ b/Makefile.in @@ -256,6 +256,7 @@ clean-zenmap: rm -f $(ZENMAPDIR)/zenmapCore/Name.pyc clean-ndiff: + rm -f $(NDIFFDIR)/Version.pyc clean-nping: -cd $(NPINGDIR) && $(MAKE) clean @@ -366,7 +367,10 @@ install-zenmap: $(ZENMAPDIR)/pyproject.toml # Create a symlink from xnmap to zenmap unconditionally. ln -sf zenmap $(DESTDIR)$(bindir)/xnmap -build-ndiff: +$(NDIFFDIR)/Version.py: $(ZENMAPDIR)/zenmapCore/Version.py + cp $^ $@ + +build-ndiff: $(NDIFFDIR)/pyproject.toml $(NDIFFDIR)/Version.py $(PYTHON) -m build $(NDIFFDIR)/ build-nping: $(NPINGDIR)/Makefile build-nbase build-nsock build-netutil $(NPINGDIR)/nping.h @DNET_BUILD@ @PCAP_BUILD@ diff --git a/ndiff/Version.py b/ndiff/Version.py new file mode 100644 index 000000000..914410c18 --- /dev/null +++ b/ndiff/Version.py @@ -0,0 +1 @@ +VERSION = "7.97" diff --git a/ndiff/pyproject.toml b/ndiff/pyproject.toml index 6a94efb7c..fd50f5208 100644 --- a/ndiff/pyproject.toml +++ b/ndiff/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta" [project] name = "ndiff" license = {text = "Nmap License (https://nmap.org/book/man-legal.html)"} -version = "7.96" +dynamic = ["version"] authors = [{name = "The Nmap Project"}] description = "Nmap scan diff tool" readme = {file = "README", content-type = "text/plain"} @@ -23,5 +23,8 @@ ndiff = "ndiff:run_main" [tool.setuptools] py-modules = ["ndiff"] +[tool.setuptools.dynamic] +version = {attr = "Version.VERSION"} + #[tool.setuptools.packages.find] #include = ["ndiff"]