Re: [Nix-dev] Python & installation

2016-04-23 Thread Vladimír Čunát
On 04/23/2016 04:22 PM, Marc Weber wrote:
>> IIRC the wiki is read-only now on purpose. Its content is being (slowly)
>> reviewed and integrated into our documentation.
>> https://github.com/NixOS/nixpkgs/milestones/Move%20the%20wiki!
> 
> It would not hurt adding comments to a wiki template:
> 
>   The wiki is readonly and will be integrated into the nixpkgs manual.
>   See _issue of github_. Thus the only changes which will be done here
>   will be "removing content" or "telling that moving all important
>   pieces is complete".
> 
> Then when all contents have been moved an article could be "deleted" or
> marked as "done". How do you keep track of progress otherwise?
> 
> A readonly copy could be offered as "archive" (or html dump).

Nice suggestions, I think. For progress tracking there is one github
issue per wiki page created, all assigned to that milestone I linked.




smime.p7s
Description: S/MIME Cryptographic Signature
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Python & installation

2016-04-23 Thread Marc Weber
> IIRC the wiki is read-only now on purpose. Its content is being (slowly)
> reviewed and integrated into our documentation.
> https://github.com/NixOS/nixpkgs/milestones/Move%20the%20wiki!

It would not hurt adding comments to a wiki template:

  The wiki is readonly and will be integrated into the nixpkgs manual.
  See _issue of github_. Thus the only changes which will be done here
  will be "removing content" or "telling that moving all important
  pieces is complete".

Then when all contents have been moved an article could be "deleted" or
marked as "done". How do you keep track of progress otherwise?

A readonly copy could be offered as "archive" (or html dump).

Marc Weber
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Python & installation

2016-04-23 Thread Vladimír Čunát
On 04/23/2016 12:14 PM, Marc Weber wrote:
> I tried fixing the article but can no longer login.

IIRC the wiki is read-only now on purpose. Its content is being (slowly)
reviewed and integrated into our documentation.
https://github.com/NixOS/nixpkgs/milestones/Move%20the%20wiki!

--Vladimir




smime.p7s
Description: S/MIME Cryptographic Signature
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Python & installation

2016-04-23 Thread Marc Weber
Those are my results

- python27.buildEnv worked

- nixos wiki: still contained the myEnv solution on the python page. I
  guess that should be replaced by buildEnv for "my use case".


  I tried fixing the article but can no longer login.
  Trying to reset password yields "Error sending mail: Unknown error in PHP's 
mail() function."


manual:

SOLUTION 1:
https://github.com/proger/python2nix
  pip installed, PYTHONPATH set, error failed to load / import "log".
  => README should be updated about how to install it?


SOLUTION 2:
https://github.com/garbas/pypi2nix
  => fails on matplotlib (png dependencies or such), thus some
  additional hint in the README about how to provide them would be nice.
  I can guess, but I don't like guessing.

  Then it looks very promising.



SOLUTION 3:
offlinehacker-pypi2nix/pypi2nix

%pypi2nix requirements.json out

  these derivations will be built:
/nix/store/5lbb4vnbyxp9f9wcx1ifq910c8xklb8c-pypi2nix-requests-py27.drv
  building path(s) 
‘/nix/store/f0zakhamn9c0pyqnp7mvwl81bw0hhip1-pypi2nix-requests-py27’
  --2016-04-23 10:08:45--  
https://raw.github.com/buildout/buildout/master/bootstrap/bootstrap.py
  Resolving raw.github.com (raw.github.com)... 185.31.17.133
  Connecting to raw.github.com (raw.github.com)|185.31.17.133|:443... connected.
  ERROR: cannot verify raw.github.com's certificate, issued by 'CN=DigiCert 
SHA2 High Assurance Server CA,OU=www.digicert.com,O=DigiCert Inc,C=US':
Unable to locally verify the issuer's authority.
  To connect to raw.github.com insecurely, use `--no-check-certificate'.
  builder for 
‘/nix/store/5lbb4vnbyxp9f9wcx1ifq910c8xklb8c-pypi2nix-requests-py27.drv’ failed 
with exit code 5
  error: build of 
‘/nix/store/5lbb4vnbyxp9f9wcx1ifq910c8xklb8c-pypi2nix-requests-py27.drv’ failed
  Traceback (most recent call last):
File 
"/nix/store/pw96jxliw0f1nsr91jl71c0mmk5j98gk-python2.7-pypi2nix-1.0_04a68d8577acbceb88bdf51b1231a9dbdead7003/bin/.pypi2nix-wrapped",
 line 12, in 
  sys.exit(main())
File 
"/nix/store/pw96jxliw0f1nsr91jl71c0mmk5j98gk-python2.7-pypi2nix-1.0_04a68d8577acbceb88bdf51b1231a9dbdead7003/lib/python2.7/site-packages/pypi2nix/cli.py",
 line 143, in main
  tmp = run_buildout(eggsdir, config)
File 
"/nix/store/pw96jxliw0f1nsr91jl71c0mmk5j98gk-python2.7-pypi2nix-1.0_04a68d8577acbceb88bdf51b1231a9dbdead7003/lib/python2.7/site-packages/pypi2nix/buildout.py",
 line 248, in run_buildout
  return buildout.run(eggsdir)
File 
"/nix/store/pw96jxliw0f1nsr91jl71c0mmk5j98gk-python2.7-pypi2nix-1.0_04a68d8577acbceb88bdf51b1231a9dbdead7003/lib/python2.7/site-packages/pypi2nix/buildout.py",
 line 104, in run
  cwd=buildout_dir, shell=True
File "/home/anton_lvov/.nix-profile/lib/python2.7/subprocess.py", line 573, 
in check_output
  raise CalledProcessError(retcode, cmd, output=output)
  subprocess.CalledProcessError: Command 
'['/run/current-system/sw/bin/nix-build']' returned non-zero exit status 100

%cat requirements.json
  [
  "requests",
  "unidecode",
  "pysqlite",
  "pandas",
  "matplotlib",
  "scipy",
  "scrapy",
  "mpl_toolkits",
  "statsmodels",
  "BeautifulSoup4"
  ]

Marc Weber
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Python & installation

2016-04-22 Thread Domen Kožar
http://nixos.org/nixpkgs/manual/ should answer all your questions regarding
Python :)

On Fri, Apr 22, 2016 at 4:59 PM, Marc Weber  wrote:

> The question I have is which is the recommended way to install "scrapy
> along with dependencies", the following fixes it by making
> propagatedUserEnvPkgs equal to propagatedBuildInputs.. is there another
> way?
>
>   diff --git a/pkgs/development/python-modules/generic/default.nix
> b/pkgs/development/python-modules/generic/default.nix
>   index 1fdbd4f..458d187 100644
>   --- a/pkgs/development/python-modules/generic/default.nix
>   +++ b/pkgs/development/python-modules/generic/default.nix
>   @@ -70,6 +70,8 @@ python.stdenv.mkDerivation (builtins.removeAttrs attrs
> ["disabled" "doCheck"] //
>  # propagate python/setuptools to active setup-hook in nix-shell
>  propagatedBuildInputs = propagatedBuildInputs ++ [ python setuptools
> ];
>
>   +  propagatedUserEnvPkgs = propagatedBuildInputs ++ [ python setuptools
> ];
>   +
>  pythonPath = pythonPath;
>
>  configurePhase = attrs.configurePhase or ''
>
> Then installing scrapy and setting PYTHONPATH or PYTHONUSERBASE seems to
> enough.
>
> Full patch adding the missing packages:
> http://mawercer.de/tmp/scrapy-diff.patch
>
> Is there an automated maintained way to do such python packaging work I
> missed? Sorry for asking such stupid question - I didn't look at python
> for a long time.
>
> Marc Weber
> ___
> nix-dev mailing list
> nix-dev@lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] Python & installation

2016-04-22 Thread Marc Weber
The question I have is which is the recommended way to install "scrapy
along with dependencies", the following fixes it by making
propagatedUserEnvPkgs equal to propagatedBuildInputs.. is there another
way?

  diff --git a/pkgs/development/python-modules/generic/default.nix 
b/pkgs/development/python-modules/generic/default.nix
  index 1fdbd4f..458d187 100644
  --- a/pkgs/development/python-modules/generic/default.nix
  +++ b/pkgs/development/python-modules/generic/default.nix
  @@ -70,6 +70,8 @@ python.stdenv.mkDerivation (builtins.removeAttrs attrs 
["disabled" "doCheck"] //
 # propagate python/setuptools to active setup-hook in nix-shell
 propagatedBuildInputs = propagatedBuildInputs ++ [ python setuptools ];
   
  +  propagatedUserEnvPkgs = propagatedBuildInputs ++ [ python setuptools ];
  +
 pythonPath = pythonPath;
   
 configurePhase = attrs.configurePhase or ''

Then installing scrapy and setting PYTHONPATH or PYTHONUSERBASE seems to
enough.

Full patch adding the missing packages:
http://mawercer.de/tmp/scrapy-diff.patch

Is there an automated maintained way to do such python packaging work I
missed? Sorry for asking such stupid question - I didn't look at python
for a long time.

Marc Weber
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev