Fix a badly-formatted Python block in the docs
The whole block is indented, though a code block with Python formatting is there.
This commit is contained in:
+15
-15
@@ -206,30 +206,30 @@ these steps into your package's build process. For example, if you're using
|
|||||||
setuptools, you can add steps to your package's `setup.py` using a structure
|
setuptools, you can add steps to your package's `setup.py` using a structure
|
||||||
like this:
|
like this:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
import subprocess
|
import subprocess
|
||||||
import setuptools
|
import setuptools
|
||||||
import setuptools.command.build_py
|
import setuptools.command.build_py
|
||||||
|
|
||||||
|
|
||||||
class BuildPyCommand(setuptools.command.build_py.build_py):
|
class BuildPyCommand(setuptools.command.build_py.build_py):
|
||||||
"""Custom build command."""
|
"""Custom build command."""
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
# your custom build steps here
|
# your custom build steps here
|
||||||
# e.g.
|
# e.g.
|
||||||
# subprocess.run(['python', 'scripts/my_custom_script.py'], check=True)
|
# subprocess.run(['python', 'scripts/my_custom_script.py'], check=True)
|
||||||
setuptools.command.build_py.build_py.run(self)
|
setuptools.command.build_py.build_py.run(self)
|
||||||
|
|
||||||
|
|
||||||
setuptools.setup(
|
setuptools.setup(
|
||||||
cmdclass={
|
cmdclass={
|
||||||
'build_py': BuildPyCommand,
|
'build_py': BuildPyCommand,
|
||||||
},
|
},
|
||||||
# Usual setup() args.
|
# Usual setup() args.
|
||||||
# ...
|
# ...
|
||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Compiler flags
|
#### Compiler flags
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user