@@ -111,8 +111,8 @@ This will open the :code:`AutotoolsPackage` file in your text editor.
111111
112112
113113.. literalinclude :: _spack_root/lib/spack/spack/build_systems/autotools.py
114- :emphasize-lines: 2,4,22-31
115- :lines: 140-160,597-615
114+ :emphasize-lines: 2,4,28-37
115+ :lines: 138-158,589-617
116116 :linenos:
117117
118118
@@ -210,8 +210,8 @@ Take note of the following:
210210
211211.. literalinclude :: _spack_root/lib/spack/spack/build_systems/makefile.py
212212 :language: python
213- :emphasize-lines: 61,65,70
214- :lines: 35-109
213+ :emphasize-lines: 60,64,69
214+ :lines: 40-111
215215 :linenos:
216216
217217Similar to :code: `Autotools `, :code: `MakefilePackage ` class has properties
@@ -497,8 +497,8 @@ Let's look at these defaults in the :code:`CMakePackage` class in the :code:`_st
497497
498498 .. literalinclude :: _spack_root/lib/spack/spack/build_systems/cmake.py
499499 :language: python
500- :lines: 217-271
501- :emphasize-lines: 5,14
500+ :lines: 167-300
501+ :emphasize-lines: 87,96
502502 :linenos:
503503
504504Some :code: `CMake ` packages use different generators. Spack is able to support
@@ -639,68 +639,18 @@ so we override the :code:`install()` method to do it for us:
639639PythonPackage
640640--------------
641641
642- Python extensions and modules are built differently from source than most
643- applications. Python uses a :code: `setup.py ` script to install Python modules.
644- The script consists of a call to :code: `setup() ` which provides the information
645- required to build a module to Distutils. If you're familiar with pip or
646- easy_install, setup.py does the same thing.
647-
642+ Python extensions and modules are built differently from source than most applications.
648643These modules are usually installed using the following line:
649644
650645.. code-block :: console
651646
652- $ python setup.py install
653-
654- There are also a list of commands and phases that you can call. To see the full
655- list you can run:
656-
657- .. code-block :: console
658-
659- $ python setup.py --help-commands
660- Standard commands:
661- build build everything needed to install
662- build_py "build" pure Python modules (copy to build directory)
663- build_ext build C/C++ extensions (compile/link to build directory)
664- build_clib build C/C++ libraries used by Python extensions
665- build_scripts "build" scripts (copy and fixup #! line)
666- clean (no description available)
667- install install everything from build directory
668- install_lib install all Python modules (extensions and pure Python)
669- install_headers install C/C++ header files
670- install_scripts install scripts (Python or otherwise)
671- install_data install data files
672- sdist create a source distribution (tarball, zip file, etc.)
673- register register the distribution with the Python package index
674- bdist create a built (binary) distribution
675- bdist_dumb create a "dumb" built distribution
676- bdist_rpm create an RPM distribution
677- bdist_wininst create an executable installer for MS Windows
678- upload upload binary package to PyPI
679- check perform some checks on the package
647+ $ pip install .
680648
681649
682650 We can write package files for Python packages using the :code: `Package ` class,
683651but the class brings with it a lot of methods that are useless for Python packages.
684652Instead, Spack has a :code: `PythonPackage ` subclass that allows packagers
685- of Python modules to be able to invoke :code: `setup.py ` and use :code: `Distutils `,
686- which is much more familiar to a typical python user.
687-
688- To see the defaults that Spack has for each a methods, we will take a look
689- at the :code: `PythonPackage ` class:
690-
691- .. code-block :: console
692-
693- $ spack edit --build-system python
694-
695- We see the following:
696-
697-
698- .. literalinclude :: _spack_root/lib/spack/spack/build_systems/python.py
699- :language: python
700- :lines: 176-204,273-290
701- :linenos:
702-
703- Each of these methods have sensible defaults or they can be overridden.
653+ of Python modules to be able to invoke :code: `pip `.
704654
705655We will write a package file for Pandas _:
706656
0 commit comments