pythonPackages.python-prctl: init at 1.7 (#42353)
This commit is contained in:
		
							parent
							
								
									46c9669878
								
							
						
					
					
						commit
						eb8e68b41b
					
				
							
								
								
									
										26
									
								
								pkgs/development/python-modules/python-prctl/default.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								pkgs/development/python-modules/python-prctl/default.nix
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,26 @@
 | 
			
		||||
{ lib
 | 
			
		||||
, buildPythonPackage
 | 
			
		||||
, fetchPypi
 | 
			
		||||
, libcap
 | 
			
		||||
}:
 | 
			
		||||
 | 
			
		||||
buildPythonPackage rec {
 | 
			
		||||
  pname = "python-prctl";
 | 
			
		||||
  version = "1.7";
 | 
			
		||||
 | 
			
		||||
  src = fetchPypi {
 | 
			
		||||
    inherit pname version;
 | 
			
		||||
    sha256 = "1njgixnavmwq45r3gpkhn1y760sax204clagg4gzwvvdc5bdbssp";
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  patches = [ ./skip_bad_tests.patch ];
 | 
			
		||||
  buildInputs = [ libcap ];
 | 
			
		||||
 | 
			
		||||
  meta = {
 | 
			
		||||
    description = "Python(ic) interface to the linux prctl syscall";
 | 
			
		||||
    homepage = https://github.com/seveas/python-prctl;
 | 
			
		||||
    license = lib.licenses.gpl3;
 | 
			
		||||
    platforms = lib.platforms.linux;
 | 
			
		||||
    maintainers = with lib.maintainers; [ catern ];
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
@ -0,0 +1,34 @@
 | 
			
		||||
--- ./test_prctl.py	2018-01-26 16:02:52.000000000 -0500
 | 
			
		||||
+++ ./test_prctl.py	2018-06-21 18:26:43.370065009 -0400
 | 
			
		||||
@@ -154,6 +154,7 @@
 | 
			
		||||
         prctl.set_keepcaps(False)
 | 
			
		||||
         self.assertEqual(prctl.get_keepcaps(), False)
 | 
			
		||||
 
 | 
			
		||||
+    @unittest.skip("No access to /proc in the Nix build sandbox")
 | 
			
		||||
     @require('set_mce_kill')
 | 
			
		||||
     def test_mce_kill(self):
 | 
			
		||||
         """Test the MCE_KILL setting"""
 | 
			
		||||
@@ -173,6 +174,7 @@
 | 
			
		||||
         prctl.set_name(name)
 | 
			
		||||
         self.assertEqual(prctl.get_name(), name[:15])
 | 
			
		||||
 
 | 
			
		||||
+    @unittest.skip("The Nix build sandbox has no_new_privs already enabled")
 | 
			
		||||
     @require('get_no_new_privs')
 | 
			
		||||
     def test_no_new_privs(self):
 | 
			
		||||
         """Test the no_new_privs function"""
 | 
			
		||||
@@ -189,6 +191,7 @@
 | 
			
		||||
                 self.assertNotEqual(sp.returncode, 0)
 | 
			
		||||
             os._exit(0)
 | 
			
		||||
 
 | 
			
		||||
+    @unittest.skip("No access to /proc in the Nix build sandbox")
 | 
			
		||||
     def test_proctitle(self):
 | 
			
		||||
         """Test setting the process title, including too long titles"""
 | 
			
		||||
         title = "This is a test!"
 | 
			
		||||
@@ -225,6 +228,7 @@
 | 
			
		||||
             os._exit(0)
 | 
			
		||||
         self.assertRaises(OSError, prctl.set_ptracer, new_pid)
 | 
			
		||||
 
 | 
			
		||||
+    @unittest.skip("The Nix build sandbox has seccomp already enabled")
 | 
			
		||||
     @require('get_seccomp')
 | 
			
		||||
     def test_seccomp(self):
 | 
			
		||||
         """Test manipulation of the seccomp setting"""
 | 
			
		||||
@ -440,6 +440,8 @@ in {
 | 
			
		||||
 | 
			
		||||
  python-periphery = callPackage ../development/python-modules/python-periphery { };
 | 
			
		||||
 | 
			
		||||
  python-prctl = callPackage ../development/python-modules/python-prctl { };
 | 
			
		||||
 | 
			
		||||
  python-sql = callPackage ../development/python-modules/python-sql { };
 | 
			
		||||
 | 
			
		||||
  python-stdnum = callPackage ../development/python-modules/python-stdnum { };
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user