Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add environmental variable that strips xbr. #1374

Merged
merged 1 commit into from Apr 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
File renamed without changes.
File renamed without changes.
73 changes: 42 additions & 31 deletions setup.py
Expand Up @@ -26,6 +26,7 @@

import os
import sys
import shutil
import platform
from setuptools import setup
from setuptools.command.test import test as test_command
Expand Down Expand Up @@ -141,7 +142,44 @@
# everything
extras_require_all = extras_require_twisted + extras_require_accelerate + extras_require_compress + \
extras_require_serialization + extras_require_encryption + extras_require_scram + \
extras_require_nvx + extras_require_xbr
extras_require_nvx

packages = [
'autobahn',
'autobahn.test',
'autobahn.wamp',
'autobahn.wamp.gen',
'autobahn.wamp.gen.wamp',
'autobahn.wamp.gen.wamp.proto',
'autobahn.wamp.test',
'autobahn.websocket',
'autobahn.websocket.test',
'autobahn.rawsocket',
'autobahn.rawsocket.test',
'autobahn.asyncio',
'autobahn.twisted',
'autobahn.twisted.testing',
'autobahn.nvx',
'autobahn.nvx.test',
'twisted.plugins',
]

package_data = {'autobahn.asyncio': ['./test/*']}

entry_points = {
"console_scripts": [
"wamp = autobahn.__main__:_main",
]
}

if 'AUTOBAHN_STRIP_XBR' in os.environ:
# force regeneration of egg-info manifest for stripped install
shutil.rmtree('autobahn.egg-info', ignore_errors=True)
else:
extras_require_all += extras_require_xbr
packages += ['autobahn.xbr', 'autobahn.asyncio.xbr', 'autobahn.twisted.xbr']
package_data['xbr'] = ['./xbr/contracts/*.json']
entry_points['console_scripts'] += ["xbrnetwork = autobahn.xbr._cli:_main"]

# development dependencies
extras_require_dev = [
Expand Down Expand Up @@ -231,38 +269,11 @@ def run_tests(self):
cmdclass={
'test': PyTest
},
packages=[
'autobahn',
'autobahn.test',
'autobahn.wamp',
'autobahn.wamp.gen',
'autobahn.wamp.gen.wamp',
'autobahn.wamp.gen.wamp.proto',
'autobahn.wamp.test',
'autobahn.websocket',
'autobahn.websocket.test',
'autobahn.rawsocket',
'autobahn.rawsocket.test',
'autobahn.asyncio',
'autobahn.twisted',
'autobahn.twisted.testing',
'autobahn.nvx',
'autobahn.nvx.test',
'autobahn.xbr',
'twisted.plugins',
],
package_data={
'autobahn.asyncio': ['./test/*'],
'xbr': ['./xbr/contracts/*.json'],
},
packages=packages,
package_data=package_data,
cffi_modules=cffi_modules,

entry_points={
"console_scripts": [
"wamp = autobahn.__main__:_main",
"xbrnetwork = autobahn.xbr._cli:_main",
]
},
entry_points=entry_points,

# this flag will make files from MANIFEST.in go into _source_ distributions only
include_package_data=True,
Expand Down