1From b13b7e38b38e2c79c0a13be32e05f0451483cd01 Mon Sep 17 00:00:00 2001
2From: James Hilliard <james.hilliard1@gmail.com>
3Date: Sat, 12 Jun 2021 15:32:37 -0600
4Subject: [PATCH] Fix duplicate xbr packages and xbr templates package_data.
5 (#1492)
6
7Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
8[james.hilliard1@gmail.com: backport from upstream commit
9a370f9e7154e59b313cb675bfcaf8cad6011bd52]
10---
11 MANIFEST.in |  1 -
12 setup.py    | 10 ++++++++--
13 2 files changed, 8 insertions(+), 3 deletions(-)
14
15diff --git a/MANIFEST.in b/MANIFEST.in
16index f4cb6da1..1dd32f0e 100644
17--- a/MANIFEST.in
18+++ b/MANIFEST.in
19@@ -1,4 +1,3 @@
20 include LICENSE
21 include autobahn/nvx/_utf8validator.c
22 recursive-include autobahn/wamp/gen/schema *
23-recursive-include autobahn/xbr/templates *
24diff --git a/setup.py b/setup.py
25index cf4e29ba..f27006da 100644
26--- a/setup.py
27+++ b/setup.py
28@@ -166,6 +166,12 @@ packages = [
29     'twisted.plugins',
30 ]
31
32+xbr_packages = [
33+    'autobahn.xbr',
34+    'autobahn.asyncio.xbr',
35+    'autobahn.twisted.xbr',
36+]
37+
38 package_data = {'autobahn.asyncio': ['./test/*']}
39
40 entry_points = {
41@@ -179,8 +185,8 @@ if 'AUTOBAHN_STRIP_XBR' in os.environ:
42     shutil.rmtree('autobahn.egg-info', ignore_errors=True)
43 else:
44     extras_require_all += extras_require_xbr
45-    packages += ['autobahn.xbr', 'autobahn.asyncio.xbr', 'autobahn.twisted.xbr']
46-    package_data['xbr'] = ['./xbr/contracts/*.json']
47+    packages += xbr_packages
48+    package_data['xbr'] = ['./xbr/templates/*.py.jinja2']
49     entry_points['console_scripts'] += ["xbrnetwork = autobahn.xbr._cli:_main"]
50
51 # development dependencies
52--
532.25.1
54
55