def test_get_default_config():
    ext = Extension()

    config = ext.get_default_config()

    assert '[podcast-ivoox]' in config
    assert 'enabled = true' in config
def test_get_default_config():
    ext = Extension()

    config = ext.get_default_config()

    assert "[{{ cookiecutter.ext_name }}]" in config
    assert "enabled = true" in config
def test_get_config_schema():
    ext = Extension()

    schema = ext.get_config_schema()
Example #4
0
Vim�UnDo����a;7�_�6 ��*�~U��M}|���G�\q)?           Extension("minary.miner.*", ["minary/aminer/*.py"]),!1IIII\��h_�����\�~A�5�_�����\�~C�)<Paste>5�_�����\�~Q�
    name = 'My Program Name',5�_�	����\�~V�
    name= 'My Program Name',5�_�����\�~W�(    cmdclass = {'build_ext': build_ext},5�_�
����\�~X�'    cmdclass= {'build_ext': build_ext},5�_�	����\�~Z�    ext_modules = ext_modules5�_�
	����\�~[�    ext_modules= ext_modules5�_�	
	����\�~e�	2#   ... all your modules that need be compiled ...5�_�
	����\�~f�	5�_�
����\�~i�.    Extension("mymodule1",  ["mymodule1.py"]),5�_�
����\�~��%    Extension("",  ["mymodule1.py"]),5�_�
$����\�~��+    Extension("minary",  ["mymodule1.py"]),5�_�����\�~��.    Extension("mymodule2",  ["mymodule2.py"]),5�_�����\�~��5�_�

����\�~��	
    name='My Program Name',5�_�

����\�~��	
    name='',5�_�����\�2�
#    Extension("minary",  ["*.py"]),5�_�%����\�6�
-    Extension("minary",  ["minary/api*.py"]),5�_�'����\�O�
.    Extension("minary",  ["minary/api/*.py"]),5�_�+����\���
�
5�_�����\���3    Extension("minary",  ["minary/api/server.py"]),5�_�����\���3    Extension("minary",  ["minary/api/server.py"]),5�_�+����\���9    Extension("minary.miner",  ["minary/api/server.py"]),5�_�4����\���;    Extension("minary.miner",  ["minary/miner/server.py"]),5�_�%����\����5�_� ����\���	6    Extension("minary.miner",  ["minary/miner/*.py"]),5�_�=����\��	�	?    Extension("minary.miner",  glob.glob("minary/miner/*.py"]),5�_�����\��y���5�_�"����\����%5�_�$!"����\��6�
&5�_�"%#$����\��=�.)�	)5�_�$&%����	V\��B�5�_�%'&����V\��C�5�_�&('����V\��D�# ...5�_�')(����V\��D�5�_�(*)
����V\��G�	
# ...5�_�)+*
����V\��G�	
5�_�*,+	����V\��I
�	F5�_�+-,E����!#V\��R�FJH�FGH�EGG5�_�,.-E����!#V\��U�DE&    cmdclass={'build_ext': build_ext},5�_�-/.E����!#V\��V�DE5�_�.0/����IV\��s�Ifrom setuptools import setup*from setuptools.extension import Extension"from Cython.Build import cythonize&from Cython.Distutils import build_extfrom pathlib import Path
import shutilclass MyBuildExt(build_ext):    def run(self):        build_ext.run(self)(        build_dir = Path(self.build_lib)(        root_dir = Path(__file__).parent@        target_dir = build_dir if not self.inplace else root_dirK        self.copy_file(Path('mypkg') / '__init__.py', root_dir, target_dir)L        self.copy_file(Path('mypkg2') / '__init__.py', root_dir, target_dir)K        self.copy_file(Path('mypkg') / '__main__.py', root_dir, target_dir)L        self.copy_file(Path('mypkg2') / '__main__.py', root_dir, target_dir);    def copy_file(self, path, source_dir, destination_dir):,        if not (source_dir / path).exists():            returnL        shutil.copyfile(str(source_dir / path), str(destination_dir / path))setup(# ...    cmdclass=dict(        build_ext=MyBuildExt    ),# ...)setup(    name="mypkg",    ext_modules=cythonize(	        [0           Extension("mypkg.*", ["mypkg/*.py"]),1           Extension("mypkg2.*", ["mypkg2/*.py"])
        ],        build_dir="build",!        compiler_directives=dict("        always_allow_keywords=True        )),    cmdclass=dict(        build_ext=build_ext    ),     packages=["mypkg", "mypkg2"]) from distutils.core import setup)from distutils.extension import Extension&from Cython.Distutils import build_extimport globext_modules = [7    Extension("minary.api",  ["minary/api/server.py"]),?    Extension("minary.miner",  glob.glob("minary/miner/*.py")),]setup(    name='minary',    cmdclass=dict(        build_ext=MyBuildExt    ),    ext_modules=ext_modules)5�_�/20����V\��z��5�_�0312����V\����5�_�243����V\�����5�_�354����V\���
�.5�_�465
Example #5
0
         Extension('leveldb',
             sources = [
-                # snappy
-                './snappy/snappy.cc',
-                './snappy/snappy-stubs-internal.cc',
-                './snappy/snappy-sinksource.cc',
-                './snappy/snappy-c.cc',
-
-                #leveldb
-                'leveldb/db/builder.cc',
-                'leveldb/db/c.cc',
-                'leveldb/db/db_impl.cc',
-                'leveldb/db/db_iter.cc',
-                'leveldb/db/dbformat.cc',
-                'leveldb/db/filename.cc',
-                'leveldb/db/log_reader.cc',
-                'leveldb/db/log_writer.cc',
-                'leveldb/db/memtable.cc',
-                'leveldb/db/repair.cc',
-                'leveldb/db/table_cache.cc',
-                'leveldb/db/version_edit.cc',
-                'leveldb/db/version_set.cc',
-                'leveldb/db/write_batch.cc',
-                'leveldb/table/block.cc',
-                'leveldb/table/block_builder.cc',
-                'leveldb/table/filter_block.cc',
-                'leveldb/table/format.cc',
-                'leveldb/table/iterator.cc',
-                'leveldb/table/merger.cc',
-                'leveldb/table/table.cc',
-                'leveldb/table/table_builder.cc',
-                'leveldb/table/two_level_iterator.cc',
-                'leveldb/util/arena.cc',
-                'leveldb/util/bloom.cc',
-                'leveldb/util/cache.cc',
-                'leveldb/util/coding.cc',
-                'leveldb/util/comparator.cc',
-                'leveldb/util/crc32c.cc',
-                'leveldb/util/env.cc',
-                'leveldb/util/env_posix.cc',
-                'leveldb/util/filter_policy.cc',
-                'leveldb/util/hash.cc',
-                'leveldb/util/histogram.cc',
-                'leveldb/util/logging.cc',
-                'leveldb/util/options.cc',
-                'leveldb/util/status.cc',
-                'leveldb/port/port_posix.cc',
-
                 # python stuff
                 'leveldb_ext.cc',
                 'leveldb_object.cc',
             ],
-            libraries = ['stdc++'],
+            libraries = ['leveldb'],
             extra_compile_args = extra_compile_args,
         )
Example #6
0
--- setup.py~	2009-01-12 14:38:38.000000000 +0200
+++ setup.py	2009-01-12 15:03:21.000000000 +0200
@@ -23,7 +23,7 @@
 #
 import sys, os
 from warnings import warn
-from setuptools import setup, Extension
+from distutils.core import setup, Extension
 
 descr = "Python bindings for liblzma"
 long_descr = """PylibLZMA provides a python interface for the liblzma library
@@ -54,6 +54,8 @@
 pc_libs = subprocess.Popen("pkg-config --libs liblzma", shell=True, stdout=subprocess.PIPE, close_fds=True).stdout.readline().strip()
 if(pc_libs):
 	link_args.extend(pc_libs.split(' '))
+link_args.append('-L%s/lib' % os.environ["LOCALBASE"])
+link_args.append('-lpython%i.%i' % sys.version_info[:2])
 
 extens=[Extension('lzma', c_files, extra_compile_args=compile_args, extra_link_args=link_args, define_macros=version_define)]
 
@@ -74,7 +76,6 @@
     ],
     py_modules = modules,
     ext_modules = extens,
-    test_suite = 'tests',
 )
 
 sys.exit(0)
Example #7
0
 def test_proxy_detection(self):
     crxPath = os.path.join(current_dir, "testdata/demoChromeExtension/2.0.1.crx")
     srcPath = os.path.join(current_dir, "testdata/demoChromeExtension/ackklpppeabjfopekidhhdlhicdlgnib/2.0.1")
     extensionId = "aglpnpfajplhchagjjnkihgdmhjlakja"
     extension = Extension.Extension(crxPath, srcPath, extensionId = extensionId)
     Analyser.proxy_detect_javascript_in_html(extension, self.script_path)