Of course it does not affect the "sound of the pickups", but the pickups don't have any sound to themselves anyway: they only pick up the sound that's coming from the guitar strings and modify it.
The sound of the strings, on the other hand, is affected quite a lot by the mechanical resonances of the guitar, in particular by the neck but also by the body. Because on a frequency the guitar can easily resonate to, the strings are able to release much more energy into the environment than for a frequency where the body does not move along at all. And which frequencies these are depends on a lot of parameters, which are different for every guitar type and even for guitars built in exactly the same way but from different types of wood.
So if you equip, for instance, a Les Paul and a tele with exactly the same pickups an circuitry, you will still get very notably different sounds. The difference is even more obvious when you also consider hollow-body guitars: quite a lot of these actually do have the same pickups and circuitry on them as Les Pauls, but still sound completely different.
To make the point about the mechanical resonances a little clear: if you built a guitar by spanning one string across a plastic broomstick, no matter what pickup you equip it with, it will always sound like just what it is. That's because the material is so light and soft that it can resonate to virtually any frequency and absorb a lot of energy.
On the other hand, if you use a massive block of granite, which is so heavy and hard that it will resonate but very little, you get a very long sustain (most damping is then due to string stiffness and perhaps even air friction) and a literally very hard sound, because none of the overtones are filtered particularly strong.