mirror of
				https://github.com/ets-labs/python-dependency-injector.git
				synced 2025-11-04 09:57:37 +03:00 
			
		
		
		
	Update repository structure
This commit is contained in:
		
							parent
							
								
									cc85ae5a8f
								
							
						
					
					
						commit
						e3408075de
					
				| 
						 | 
				
			
			@ -2,7 +2,7 @@
 | 
			
		|||
 | 
			
		||||
# Add <file or directory> to the black list. It should be a base name, not a
 | 
			
		||||
# path. You may set this option multiple times.
 | 
			
		||||
ignore=utils,test
 | 
			
		||||
ignore=utils,tests
 | 
			
		||||
 | 
			
		||||
[MESSAGES CONTROL]
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -4,7 +4,7 @@ install:
 | 
			
		|||
    - pip install cython
 | 
			
		||||
    - make cythonize
 | 
			
		||||
script: 
 | 
			
		||||
    - tox -v
 | 
			
		||||
    - tox
 | 
			
		||||
language: python
 | 
			
		||||
python:
 | 
			
		||||
    - 3.5
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
recursive-include dependency_injector *.py *.pyx *.pxd *.c
 | 
			
		||||
recursive-include src/dependency_injector *.py *.pyx *.pxd *.c
 | 
			
		||||
include README.rst
 | 
			
		||||
include CONTRIBUTORS.rst
 | 
			
		||||
include LICENSE.rst
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										19
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								Makefile
									
									
									
									
									
								
							| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
VERSION := $(shell python setup.py --version)
 | 
			
		||||
 | 
			
		||||
CYTHON_SRC := $(shell find dependency_injector -name '*.pyx')
 | 
			
		||||
CYTHON_SRC := $(shell find src/dependency_injector -name '*.pyx')
 | 
			
		||||
 | 
			
		||||
CYTHON_DIRECTIVES =
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -12,11 +12,11 @@ endif
 | 
			
		|||
 | 
			
		||||
clean:
 | 
			
		||||
	# Clean sources
 | 
			
		||||
	find dependency_injector -name '*.py[cod]' -delete
 | 
			
		||||
	find dependency_injector -name '__pycache__' -delete
 | 
			
		||||
	find dependency_injector -name '*.c' -delete
 | 
			
		||||
	find dependency_injector -name '*.so' -delete
 | 
			
		||||
	find dependency_injector -name '*.html' -delete
 | 
			
		||||
	find src -name '*.py[cod]' -delete
 | 
			
		||||
	find src -name '__pycache__' -delete
 | 
			
		||||
	find src -name '*.c' -delete
 | 
			
		||||
	find src -name '*.so' -delete
 | 
			
		||||
	find src -name '*.html' -delete
 | 
			
		||||
	# Clean tests
 | 
			
		||||
	find tests -name '*.py[co]' -delete
 | 
			
		||||
	find tests -name '__pycache__' -delete
 | 
			
		||||
| 
						 | 
				
			
			@ -29,16 +29,19 @@ cythonize:
 | 
			
		|||
	cython -a $(CYTHON_DIRECTIVES) $(CYTHON_SRC)
 | 
			
		||||
	# Move all Cython html reports
 | 
			
		||||
	mkdir -p reports/cython/
 | 
			
		||||
	find dependency_injector -name '*.html' -exec mv {}  reports/cython/  \;
 | 
			
		||||
	find src -name '*.html' -exec mv {}  reports/cython/  \;
 | 
			
		||||
 | 
			
		||||
build: clean cythonize
 | 
			
		||||
	# Compile C extensions
 | 
			
		||||
	python setup.py build_ext --inplace
 | 
			
		||||
 | 
			
		||||
install: clean cythonize
 | 
			
		||||
	python setup.py install
 | 
			
		||||
 | 
			
		||||
test:
 | 
			
		||||
	# Unit tests with coverage report
 | 
			
		||||
	coverage erase
 | 
			
		||||
	coverage run --rcfile=./.coveragerc -m unittest2 discover tests
 | 
			
		||||
	coverage run --rcfile=./.coveragerc -m unittest2 discover tests/unit
 | 
			
		||||
	coverage report --rcfile=./.coveragerc
 | 
			
		||||
	coverage html --rcfile=./.coveragerc
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										16
									
								
								setup.py
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								setup.py
									
									
									
									
									
								
							| 
						 | 
				
			
			@ -15,7 +15,7 @@ with open('requirements.txt') as version:
 | 
			
		|||
    requirements = version.readlines()
 | 
			
		||||
 | 
			
		||||
# Getting version:
 | 
			
		||||
with open('dependency_injector/__init__.py') as init_file:
 | 
			
		||||
with open('src/dependency_injector/__init__.py') as init_file:
 | 
			
		||||
    version = re.search('VERSION = \'(.*?)\'', init_file.read()).group(1)
 | 
			
		||||
 | 
			
		||||
# Defining macros:
 | 
			
		||||
| 
						 | 
				
			
			@ -34,15 +34,19 @@ setup(name='dependency-injector',
 | 
			
		|||
      maintainer='Roman Mogilatov',
 | 
			
		||||
      maintainer_email='rmogilatov@gmail.com',
 | 
			
		||||
      url='https://github.com/ets-labs/python-dependency-injector',
 | 
			
		||||
      bugtrack_url='https://github.com/ets-labs/python-dependency-injector' +
 | 
			
		||||
                   '/issues',
 | 
			
		||||
      download_url='https://pypi.python.org/pypi/dependency_injector',
 | 
			
		||||
      install_requires=requirements,
 | 
			
		||||
      packages=['dependency_injector',
 | 
			
		||||
                'dependency_injector.providers'],
 | 
			
		||||
      packages=[
 | 
			
		||||
          'dependency_injector',
 | 
			
		||||
          'dependency_injector.providers',
 | 
			
		||||
      ],
 | 
			
		||||
      package_dir={
 | 
			
		||||
          'dependency_injector': 'src/dependency_injector',
 | 
			
		||||
          'dependency_injector.providers': 'src/dependency_injector/providers',
 | 
			
		||||
      },
 | 
			
		||||
      ext_modules=[
 | 
			
		||||
          Extension('dependency_injector.injections',
 | 
			
		||||
                    ['dependency_injector/injections.c'],
 | 
			
		||||
                    ['src/dependency_injector/injections.c'],
 | 
			
		||||
                    define_macros=defined_macros,
 | 
			
		||||
                    extra_compile_args=['-O2']),
 | 
			
		||||
      ],
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6,5 +6,3 @@ class Error(Exception):
 | 
			
		|||
 | 
			
		||||
    All dependency injector errors extend this error class.
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
print(__file__, __name__)
 | 
			
		||||
							
								
								
									
										5291
									
								
								src/dependency_injector/injections.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5291
									
								
								src/dependency_injector/injections.c
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								src/dependency_injector/injections.so
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								src/dependency_injector/injections.so
									
									
									
									
									
										Executable file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										5
									
								
								tox.ini
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								tox.ini
									
									
									
									
									
								
							| 
						 | 
				
			
			@ -6,7 +6,7 @@ envlist=
 | 
			
		|||
deps=
 | 
			
		||||
    unittest2
 | 
			
		||||
commands=
 | 
			
		||||
    unit2 discover tests
 | 
			
		||||
    unit2 discover tests/unit
 | 
			
		||||
 | 
			
		||||
[testenv:coveralls]
 | 
			
		||||
basepython=python3.5
 | 
			
		||||
| 
						 | 
				
			
			@ -17,9 +17,8 @@ deps=
 | 
			
		|||
    coverage
 | 
			
		||||
    coveralls
 | 
			
		||||
commands=
 | 
			
		||||
    {envpython} setup.py build_ext --inplace
 | 
			
		||||
    coverage erase
 | 
			
		||||
    coverage run --rcfile=./.coveragerc -m unittest2 discover tests
 | 
			
		||||
    coverage run --rcfile=./.coveragerc -m unittest2 discover tests/unit
 | 
			
		||||
    coveralls
 | 
			
		||||
 | 
			
		||||
[testenv:pylint]
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user