forked from Plemya-x/alr-repo
		
	
		
			
				
	
	
		
			52 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			52 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Bash
		
	
	
	
	
	
| _name='orjson'
 | |
| name='python3-orjson'
 | |
| version='3.10.7'
 | |
| release=1
 | |
| desc="Fast, correct Python JSON library supporting dataclasses and datetimes"
 | |
| homepage="https://github.com/ijl/orjson"
 | |
| architectures=('amd64')
 | |
| license=(
 | |
|   'Apache-2.0'
 | |
|   'MIT'
 | |
| )
 | |
| deps=(
 | |
|   'gcc-libs'
 | |
|   'glibc'
 | |
|   'python'
 | |
| )
 | |
| build_deps=(
 | |
|   'maturin'
 | |
|   'python3-maturin'
 | |
|   'python3-installer'
 | |
|   'rust'
 | |
|   'python3-arrow'
 | |
|   'python3-pendulum'
 | |
|   'python3-psutil'
 | |
|   'python3-pytest'
 | |
|   'python3-pytz'
 | |
|   'python3-xxhash'
 | |
| )
 | |
| sources=(https://github.com/ijl/orjson/archive/version/$_name-version.tar.gz)
 | |
| checksums=('SKIP')
 | |
| 
 | |
| build() {
 | |
|   cd $_name-version
 | |
|   maturin build --release --strip
 | |
| }
 | |
| 
 | |
| check() {
 | |
|   local _site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
 | |
| 
 | |
|   cd $_name-version
 | |
|   python -m installer --destdir=test_dir target/wheels/*.whl
 | |
|   export PYTHONPATH="test_dir/$_site_packages:$PYTHONPATH"
 | |
|   pytest -vv
 | |
| }
 | |
| 
 | |
| package() {
 | |
|   cd $_name-version
 | |
|   python -m installer --destdir="$pkgdir" target/wheels/*.whl
 | |
|   install -vDm 644 {CHANGELOG,README}.md -t "$pkgdir/usr/share/doc/$name/"
 | |
|   install -vDm 644 LICENSE-* -t "$pkgdir/usr/share/licenses/$name/"
 | |
| }
 |