Comments (11)
ok can you change that please?
from pressio-demoapps.
Hello,
based on Why you shouldn't invoke setup.py directly, there are a few things which needs to be pointed out:
- packeges setup should follow PEP517 and PEP518
- setuptools is effectively deprecated, but there are no warnings anywhere
- almost all development and maintenance on setuptools is done by Jason R. Coombs, who also maintains nearly 150 other Python packages
Summary:
- The setuptools project has stopped maintaining all direct invocations of setup.py years ago, and distutils is deprecated. There are undoubtedly many ways that your setup.py-based system is broken today, even if it's not failing loudly or obviously.
- Direct invocations of setup.py cannot bootstrap their own dependencies, and so some CLI is necessary for dependency management
- The setuptools project no longer wants to provide any public CLI, and will be actively removing the existing interface (though the time scale for this is long).
- PEP 517, 518 and other standards-based packaging are the future of the Python ecosystem and a lot of progress has been made on making this upgrade seamless.
setup.py command | python -m build (with build) |
---|---|
setup.py sdist or setup.py bdist_wheel | python -m build (with build) |
setup.py test | pytest (usually via tox or nox) |
setup.py install | pip install |
setup.py develop | pip install -e |
setup.py upload | twine upload (with twine) |
setup.py check | twine check (this doesn't do all the same checks but it's a start) |
Custom commands | tox and nox environments |
from pressio-demoapps.
@marcinwrobel1986 after merging your branch, I get this:
pip3 build.py # this works
# then I do:
pip3 install .
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
WARNING: Ignoring invalid distribution -ressiodemoapps (/usr/local/lib/python3.9/site-packages)
WARNING: Ignoring invalid distribution -ressiodemoapps (/usr/local/lib/python3.9/site-packages)
Processing /Users/fnrizzi/Desktop/work/ROM/gitrepos/pressio-demoapps
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: pressiodemoapps
Building wheel for pressiodemoapps (pyproject.toml) ... done
Created wheel for pressiodemoapps: filename=pressiodemoapps-0.1.0rc1-py3-none-any.whl size=275737 sha256=8d52394dfdfcd308a9186043cc1f38c67bc063904d56d2136b4406c257f18f17
Stored in directory: /Users/fnrizzi/Library/Caches/pip/wheels/26/70/92/f9c808f7df02b9cf525aae1425350662e075261b2a1ba9dbd8
Successfully built pressiodemoapps
WARNING: Ignoring invalid distribution -ressiodemoapps (/usr/local/lib/python3.9/site-packages)
Installing collected packages: pressiodemoapps
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
WARNING: Ignoring invalid distribution -ressiodemoapps (/usr/local/lib/python3.9/site-packages)
Successfully installed pressiodemoapps-0.1.0rc1
WARNING: Ignoring invalid distribution -ressiodemoapps (/usr/local/lib/python3.9/site-packages)
WARNING: Ignoring invalid distribution -ressiodemoapps (/usr/local/lib/python3.9/site-packages)
are all those warnings expected?
from pressio-demoapps.
- another thing is missing: how do I specify the build mode? Release vs debug? this was missing in the documentation
- you edits the documention in the wrong place: you edited files insde
docs/_sources
but should have edited files insidedocs/src
from pressio-demoapps.
@marcinwrobel1986 after merging your branch, I get this:
pip3 build.py # this works # then I do: pip3 install . DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621 WARNING: Ignoring invalid distribution -ressiodemoapps (/usr/local/lib/python3.9/site-packages) WARNING: Ignoring invalid distribution -ressiodemoapps (/usr/local/lib/python3.9/site-packages) Processing /Users/fnrizzi/Desktop/work/ROM/gitrepos/pressio-demoapps Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Building wheels for collected packages: pressiodemoapps Building wheel for pressiodemoapps (pyproject.toml) ... done Created wheel for pressiodemoapps: filename=pressiodemoapps-0.1.0rc1-py3-none-any.whl size=275737 sha256=8d52394dfdfcd308a9186043cc1f38c67bc063904d56d2136b4406c257f18f17 Stored in directory: /Users/fnrizzi/Library/Caches/pip/wheels/26/70/92/f9c808f7df02b9cf525aae1425350662e075261b2a1ba9dbd8 Successfully built pressiodemoapps WARNING: Ignoring invalid distribution -ressiodemoapps (/usr/local/lib/python3.9/site-packages) Installing collected packages: pressiodemoapps DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621 WARNING: Ignoring invalid distribution -ressiodemoapps (/usr/local/lib/python3.9/site-packages) Successfully installed pressiodemoapps-0.1.0rc1 WARNING: Ignoring invalid distribution -ressiodemoapps (/usr/local/lib/python3.9/site-packages) WARNING: Ignoring invalid distribution -ressiodemoapps (/usr/local/lib/python3.9/site-packages)
are all those warnings expected?
Hi Francesco,
should be:
python build.py
# this script taked command line arguments, so you can go with:
python build.py --help
# you will get the answer
usage: build.py [-h] [--openmp] [--build_mode BUILD_MODE]
optional arguments:
-h, --help show this help message and exit
--openmp Enables OpenMP if given
--build_mode BUILD_MODE
Defines build mode: Release or Debug
The above simply means that, --openmp
is a boolean type, so when specified then it's true, otherwise is false, regarding --build_mode
you need to pass it Release or Debug, which I think is described in help, but could be --build_mode=Release
or --build_mode Release
, same with debug
Regarding DEPRECATION messages, please don't worry about that, we are PEP517 and PEP518 compatible.
I will create a PR on Monday to fix the docs.
For building the package we use build and the command we use is:
python -m build
from pressio-demoapps.
@marcinwrobel1986 thanks! Ok we are all good.
Just to verify, to INSTALL it, one ALWYS has to do:
python build.py
pip install .
Right?
I fixed the docs (I need to fix some bugs with openmp in python, so i omitted that now in docs) .
So we are all good.
from pressio-demoapps.
@marcinwrobel1986 it seems that if i try:
python build.py --user
does not work. I get a bunch of proxy errors. The old way (python setup.py install
) works however. any idea?
from pressio-demoapps.
@marcinwrobel1986 it seems that if i try:
python build.py --user
does not work. I get a bunch of proxy errors. The old way (
python setup.py install
) works however. any idea?
Hi Francesco,
python build.py --help
if you want help. If you just want to build with OpenMP then:
python build.py --openmp
@marcinwrobel1986 sorry i meant:
pip install --user .
does not work , i get a bunch of proxy errros
I tried on develop branch, not in virtual env and worked for me:
pip install --user .
Processing /home/marcin/Dokumenty/NGA/projects/pressio-demoapps
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: pressiodemoapps
Building wheel for pressiodemoapps (pyproject.toml) ... done
Created wheel for pressiodemoapps: filename=pressiodemoapps-0.1.0rc1-py3-none-any.whl size=273390 sha256=c1d68965abbba689df5464e33f974895508475482d169d17057a0aeaba58350c
Stored in directory: /home/marcin/.cache/pip/wheels/06/92/45/110174e2547693a3c193e2ecd6d258198fa35c48df2b397535
Successfully built pressiodemoapps
Installing collected packages: pressiodemoapps
Successfully installed pressiodemoapps-0.1.0rc1
from pressio-demoapps.
BTW this build script is mine script to build library with CMake, it has nothing to do with building or installing Python package.
This is done with:
Just building:
python -m build
Building and installing at once:
pip install .
from pressio-demoapps.
@marcinwrobel1986
sorry i meant: pip install --user .
does not work , i get a bunch of proxy errros
from pressio-demoapps.
Ok, I noticed one more problem, remember when you wanted me to change the name of the script from cmake_build.py
to build.py
? This has a conflict now, because then you call python -m build
, then the script is ran instead of the build package which is called build
:/ I propose to get back to cmake_build.py
from pressio-demoapps.
Related Issues (20)
- python tests: add missing ones using as reference the C++ ones
- add radial advection problem HOT 1
- doc: verify commands for building the mesh for each problem
- 1D Burgers problem
- Documentation 2D Shallow water HOT 1
- burgers2d: erro in doc HOT 1
- 1D Burgers' equation HOT 6
- possible typo in documentation HOT 1
- ci too slow in debug mode: need to make tests smaller
- test auto add
- schwarz: semantics of problem classes
- schwarz: make ccu mesh default constructible, assignable and movable
- schwarz: `bool isFullyPeriodic()` should not be a method inside the ccu mesh class
- schwarz: expose nested alias for the connectivity graph
- schwarz: support custom BCs in a practical, less intrusive way
- cleanup headers includes
- make `numDofPerCell` NOT a template in the problem classes
- add method to api adapter to query numDofPerCells
- add method to set BCFunctor internal pointer HOT 2
- add dummy icIdentifier to Swe2d create_problem_eigen for consistent Schwarz subdomain initialization
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pressio-demoapps.