backport changes for Python2-/buildout-based implementation from cco.storage
This commit is contained in:
		
							parent
							
								
									02a56bf94d
								
							
						
					
					
						commit
						71fc565a7e
					
				
					 4 changed files with 51 additions and 30 deletions
				
			
		|  | @ -1,22 +0,0 @@ | |||
| [build-system] | ||||
| requires = ["setuptools"] | ||||
| build-backend = "setuptools.build_meta" | ||||
| 
 | ||||
| [project] | ||||
| name = "py-scopes" | ||||
| version = "3.0.1" | ||||
| description = "Implementation of the strange 'scopes' paradigma in Python" | ||||
| readme = "README.md" | ||||
| license = {text = "MIT"} | ||||
| keywords = ["scopes"] | ||||
| authors = [{name = "Helmut Merz", email = "helmutm@cy55.de"}] | ||||
| 
 | ||||
| dependencies = [ | ||||
| 	"transaction", | ||||
| 	"psycopg[binary]", | ||||
| 	"SQLAlchemy", | ||||
| 	"zope.sqlalchemy", | ||||
| ] | ||||
| 
 | ||||
| [project.optional-dependencies] | ||||
| test = ["pytest"] | ||||
|  | @ -22,7 +22,7 @@ class Track(object): | |||
|     headFields = ['taskId', 'userName'] | ||||
|     prefix = 'rec' | ||||
| 
 | ||||
|     def __init__(self, *keys, data=None, timeStamp=None, trackId=None, container=None): | ||||
|     def __init__(self, *keys, **kw): | ||||
|         self.head = {} | ||||
|         for ix, k in enumerate(keys): | ||||
|             self.head[self.headFields[ix]] = k | ||||
|  | @ -30,10 +30,10 @@ class Track(object): | |||
|             if self.head.get(k) is None: | ||||
|                 self.heaad[k] = '' | ||||
|             setattr(self, k, self.head[k]) | ||||
|         self.data = data or {} | ||||
|         self.timeStamp = timeStamp | ||||
|         self.trackId = trackId | ||||
|         self.container = container | ||||
|         self.data = kw.get('data') or {} | ||||
|         self.timeStamp = kw.get('timeStamp') | ||||
|         self.trackId = kw.get('trackId') | ||||
|         self.container = kw.get('container') | ||||
| 
 | ||||
|     def update(self, data, overwrite=False): | ||||
|         if data is None: | ||||
|  |  | |||
|  | @ -11,7 +11,7 @@ from scopes.storage.common import Storage, getEngine, sessionFactory | |||
| from scopes.storage import proxy | ||||
| from scopes.storage import tracking | ||||
| 
 | ||||
| engine = getEngine('postgresql+psycopg', 'testdb', 'testuser', 'secret') | ||||
| engine = getEngine('postgresql', 'ccotest', 'ccotest', 'cco') | ||||
| scopes.storage.common.engine = engine | ||||
| scopes.storage.common.Session = sessionFactory(engine) | ||||
| 
 | ||||
							
								
								
									
										47
									
								
								setup.py
									
										
									
									
									
								
							
							
						
						
									
										47
									
								
								setup.py
									
										
									
									
									
								
							|  | @ -1,4 +1,47 @@ | |||
| from setuptools import setup | ||||
| from setuptools import setup, find_packages | ||||
| import os | ||||
| 
 | ||||
| setup() | ||||
| version = '2.0' | ||||
| 
 | ||||
| long_description = ( | ||||
|     open('README.md').read() | ||||
|     + '\n' + | ||||
|     'Contributors\n' | ||||
|     '============\n' | ||||
|     + '\n' + | ||||
|     open('CONTRIBUTORS.txt').read() | ||||
|     + '\n' + | ||||
|     open('CHANGES.txt').read() | ||||
|     + '\n') | ||||
| 
 | ||||
| setup(name='py-scopes', | ||||
|       version=version, | ||||
|       description="combined triple and event storage for the cco application platform", | ||||
|       long_description=long_description, | ||||
|       # Get more strings from | ||||
|       # http://pypi.python.org/pypi?%3Aaction=list_classifiers | ||||
|       classifiers=[ | ||||
|         "Programming Language :: Python", | ||||
|         ], | ||||
|       keywords='', | ||||
|       author='cyberconcepts.org team', | ||||
|       author_email='team@cyberconcepts.org', | ||||
|       url='http://www.cyberconcepts.org', | ||||
|       license='MIT', | ||||
|       packages=find_packages(), | ||||
|       #package_dir = {'': 'src'}, | ||||
|       #namespace_packages=['cco'], | ||||
|       include_package_data=True, | ||||
|       zip_safe=False, | ||||
|       install_requires=[ | ||||
|           'setuptools', | ||||
|           'transaction', | ||||
|           'psycopg2-binary', | ||||
|           'SQLAlchemy', | ||||
|           'zope.sqlalchemy', | ||||
|           # -*- Extra requirements: -*- | ||||
|       ], | ||||
|       entry_points=""" | ||||
|       # -*- Entry points: -*- | ||||
|       """, | ||||
|       ) | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue