Skip to content

Commit

Permalink
Revert "#11655 Update package metadata" (#11727)
Browse files Browse the repository at this point in the history
  • Loading branch information
glyph committed Oct 25, 2022
2 parents 8d8f1b0 + fbafa79 commit bc31b87
Show file tree
Hide file tree
Showing 13 changed files with 366 additions and 262 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yaml
Expand Up @@ -164,7 +164,7 @@ jobs:
- python-version: '3.7'
tox-env: 'alldeps-gtk-withcov-posix'
trial-target: 'twisted.internet.test'
platform-deps: 'gtk-platform'
platform-deps: 'gtk_platform'
tox-wrapper: 'xvfb-run -a'
job-name: 'gtk-tests'

Expand Down Expand Up @@ -210,7 +210,7 @@ jobs:
# Make sure the matrix is defined in such a way that this is triggered
# only on Linux.
- name: Install GTK system deps
if: matrix.platform-deps == 'gtk-platform'
if: matrix.platform-deps == 'gtk_platform'
run: |
# *-dev dependencies are for pygobject
# https://gitlab.gnome.org/GNOME/pygobject/-/blob/3.42.0/setup.py#L129-L134
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Expand Up @@ -26,4 +26,4 @@ python:
- method: pip
path: .
extra_requirements:
- dev-release
- dev_release
93 changes: 93 additions & 0 deletions MANIFEST.in
@@ -0,0 +1,93 @@
# This file dictates what goes into a sdist tarball.
# As a release tarball, we want to include:
# - All of the library code.
# - All the useful documentation (but not the super historic stuff)
# - All of the test files, so that the tests can be run on an installed copy.
# We do not want to include:
# - Release management files (e.g. topfiles)
# - Things only useful when running from a source checkout

# Do not include the old topfiles, or news fragments
recursive-exclude src/twisted *.misc *.bugfix *.doc *.feature *.removal
recursive-exclude src/twisted NEWS README newsfragments
exclude src/twisted/topfiles/CREDITS src/twisted/topfiles/ChangeLog.Old

# Include NEWS, READMEs, etc
recursive-include docs README
include NEWS.rst README.rst INSTALL.rst CONTRIBUTING.md LICENSE code_of_conduct.md

# Exclude admin scripts and things only useful when running from a source checkout
exclude codecov.yml
exclude .coveralls.yml
exclude .git-blame-ignore-revs
exclude .readthedocs.yml
exclude .pre-commit-config.yaml
recursive-exclude .circleci *
exclude azure-pipelines
recursive-exclude azure-pipelines *
prune bin
prune admin
prune .github
prune docs/_build


# Include marker indicating that we ship type annotations (PEP 561)
include src/twisted/py.typed

# Include test-running utilities for downstream packagers
include mypy.ini tox.ini .coveragerc

# Include our docs templates
recursive-include src/twisted/python/_pydoctortemplates *.html

# Include all modules, even on a Python we're not installing for
recursive-include src/twisted *.py

# Some tests stuff
recursive-include src/twisted *.pem
recursive-include src/twisted/test *.pem.*
include src/twisted/internet/test/fake_CAs/*
include src/twisted/mail/test/rfc822.message

# Some extras
recursive-include src/twisted *.glade *.pxi *.h *.c *.bat *.g *.pyx *.zsh *.txt

# Docs
include docs/fun/lightbulb
recursive-include docs/historic/Quotes *
recursive-include docs *.1
recursive-include docs *.Quotes
recursive-include docs *.bat
recursive-include docs *.bmp
recursive-include docs *.com
recursive-include docs *.conf
recursive-include docs *.css
recursive-include docs *.dia
recursive-include docs *.gif
recursive-include docs *.glade
recursive-include docs *.html
recursive-include docs *.ico
recursive-include docs *.nib
recursive-include docs *.pem
recursive-include docs *.placeholder
recursive-include docs *.png
recursive-include docs *.py
recursive-include docs *.rpy
recursive-include docs *.rst
recursive-include docs *.rtl
recursive-include docs *.service
recursive-include docs *.socket
recursive-include docs *.svg
recursive-include docs *.tac
recursive-include docs *.tidyrc
recursive-include docs *.tpl
recursive-include docs *.txt
recursive-include docs *.users
recursive-include docs *.xml
recursive-include docs Makefile
recursive-include docs/_static/js *.js
prune docs/_build

# Don't have the real old historic docs
exclude docs/historic/2003
recursive-exclude docs/historic/2003 *
62 changes: 62 additions & 0 deletions admin/twisted.spec
@@ -0,0 +1,62 @@
%define name Twisted
%define version SVN-trunk
%define release 1tummy
%define prefix %{_prefix}
%define py_libver 2.3

Summary: Twisted is an event-based framework for internet applications.
Name: %{name}
Version: %{version}
Release: %{release}
Source: %{name}-%{version}.tar.bz2
License: MIT
Group: System/Libraries
URL: http://www.twistedmatrix.com/
Requires: python >= %{py_libver}
BuildRequires: python-devel
BuildRoot: %{_tmppath}/%{name}-buildroot
Prefix: %{_prefix}

%description
Twisted is an event-based framework for internet applications. It includes a
web server, a telnet server, a chat server, a news server, a generic client
and server for remote object access, and APIs for creating new protocols and
services. Twisted supports integration of the Tk, GTK+, Qt or wxPython event
loop with its main event loop. The Win32 event loop is also supported, as is
basic support for running servers on top of Jython.

%package doc
Summary: Twisted documentation and example programs
Group: Development/Python
%description doc
Twisted is an event-based framework for internet applications.
Install Twisted-doc if you need the API documentation and example programs.

%prep
%setup -n %{name}-%{version}
%build

%install
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf "$RPM_BUILD_ROOT"
mkdir -p "$RPM_BUILD_ROOT"

python setup.py install --optimize=2 --record=installed-files \
--root="$RPM_BUILD_ROOT"

# install man pages
mkdir -p "$RPM_BUILD_ROOT"/%{_mandir}/man1/
cp -a doc/man/*.1 "$RPM_BUILD_ROOT"/%{_mandir}/man1/

%clean
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf "$RPM_BUILD_ROOT"

%files
%defattr(755,root,root)
%doc CREDITS LICENSE README
%{_bindir}/*
%attr(644,-,-) %{_mandir}/man1/*
%{_libdir}/python%{py_libver}/site-packages/twisted/

%files doc
%defattr(-,root,root)
%doc doc/*
2 changes: 1 addition & 1 deletion docs/conf.py
Expand Up @@ -28,7 +28,7 @@

# -- General configuration ------------------------------------------------

# See pyproject.toml for the Sphinx version required to build the documentation.
# See setup.cfg for the Sphinx version required to build the documentation.
# needs_sphinx is not use to avoid duplication and getting these values
# out of sync.

Expand Down
15 changes: 8 additions & 7 deletions docs/development/coding-standard.rst
Expand Up @@ -393,14 +393,15 @@ This makes the script more portable but note that it is not a foolproof method.
Always make sure that ``/usr/bin/env`` exists or use a softlink/symbolic link to point it to the correct path.
Python's distutils will rewrite the shebang line upon installation so this policy only covers the source files in version control.

#. For core scripts, add an entry point to ``[project.scripts]`` in ``pyproject.toml``:
#. For core scripts, add an entry point to ``"console_scripts"`` in ``setup.cfg``:

.. code-block:: toml
.. code-block:: cfg
[project.scripts]
...
twistd = "twisted.scripts.twistd:run"
yourmodule = "twisted.scripts.yourmodule:run"
[options.entry_points]
console_scripts =
...
twistd = twisted.scripts.twistd:run
yourmodule = twisted.scripts.yourmodule:run
#. And end with:

Expand All @@ -415,7 +416,7 @@ Python's distutils will rewrite the shebang line upon installation so this polic


This will ensure that your program will have a proper ``console_scripts`` entry point, which
``pyproject.toml`` will use to generate a console script which will work correctly for users of
``setup.py`` will use to generate a console script which will work correctly for users of
Git, Windows releases and Debian packages.


Expand Down
8 changes: 4 additions & 4 deletions docs/installation/howto/optional.rst
Expand Up @@ -36,17 +36,17 @@ The following optional dependencies are supported:
* `pyasn1`_
* `cryptography`_

* **conch-nacl** - **conch** options and `PyNaCl`_ to support Ed25519 keys on systems with OpenSSL < 1.1.1b.
* **conch_nacl** - **conch** options and `PyNaCl`_ to support Ed25519 keys on systems with OpenSSL < 1.1.1b.

* **soap** - the `SOAPpy`_ package to work with SOAP.

* **serial** - the `pyserial`_ package to work with serial data.

* **all-non-platform** - installs **tls**, **conch**, **soap**, and **serial** options.
* **all_non_platform** - installs **tls**, **conch**, **soap**, and **serial** options.

* **macos-platform** - **all-non-platform** options and `pyobjc`_ to work with Objective-C apis.
* **macos_platform** - **all_non_platform** options and `pyobjc`_ to work with Objective-C apis.

* **windows-platform** - **all-non-platform** options and `pywin32`_ to work with Windows's apis.
* **windows_platform** - **all_non_platform** options and `pywin32`_ to work with Windows's apis.

* **http2** - packages needed for http2 support.

Expand Down
20 changes: 0 additions & 20 deletions hatch_build.py

This file was deleted.

0 comments on commit bc31b87

Please sign in to comment.